I'm going to assume that it's split into three along its height, if it's not then just switch x and y in my explanation.

We know then that the total perimeter is 4x+2y=1000 or y=500-2x. The area is A=xy=x(500-2x)=500x-2x^2.

Differentiate that and you'll find your answer.