Product mix for maximum profit. A firm produces two types of earphones per year: x thousand of type A and y thousand of type B. If the revenue and cost equations for the year are (in millions of dollars)

determine how many of each type of earphone should be produced per year to maximize profit. What is the maximum profit?