SOLVED

I already solved (a) by finding the derivative with respect to (x,y) and equating to 0.A firm has decided through regression analysis that its sales (S) are a function of

the amount of advertising (measured in units) in two different media, television (x) and magazines (y):

S(x, y) = 100 – x^{2}+ 30x – y^{2}+ 40y

(a)Find the level of TV and magazine advertising units that maximizes the firm's sales.

(b)Suppose that the advertising budget is restricted to 31 units. Determine the level of advertising (in units) that maximizes sales subject to this budget constraint.

(a) X^{*}= 15, Y^{*}= 20

My teacher provided the answer to (b) and I have absolutely no idea to how he arrived at it. I assumed the the Income(M)=31 but without any given prices for (x,y), I cannot seem to apply it into a Lagrangean method. Could anyone help me?

(b) X^{*}= 13, Y^{*}= 18