With 1000ft of fencing, a person wishes to fence a field into three parts as shown in the diagram. (The diagram is just a rectangle with it sectioned into three portions, y being height, x width)

How would you determine the values of x and y that give the maximum area?

** I tried to write down y in terms of x for a previous question, and I got $\displaystyle a(x)=-x^2+500$ but I really don't know if I even did that correctly.