Ch 2.7 #10

The problem is: consider a rectangle in the xy plane, with corners at (0,0), (a,0), (0,b), (a,b). If (a,b) lies on the graph of the equation y=30-x, find a and b such that the area of the rectangle is maximized.

What I got:

A=xy y=30-x so A=x(30-x) = 30x-x^2

A'=30-2x x=15

Is this correct?