.
Let x be the dimension of the pen (in feet) perpendicular to the wall.
Then the side parallel to the wall is (500-2x) feet long,
and the area of the pen is
A(x) = x*(500-2x) = -2x^2 + 500x square feet.
They want you find the maximum of the function A(x) using Calculus.
For it, differentiate A(x) over x and equate the derivative to zero:
A'(x) = -4x + 500 = 0,
which gives you x = = 125 feet.
Thus you obtain the
ANSWER. Under given conditions, the maximum area is achieved for the rectangle
with the short side of 125 ft perpendicular to the wall and long side of 500 - 2*125 = 250 ft parallel to the wall.
==============
I re-wrote/corrected my post after getting a notice from @greenestamps.
@greenestamps, thanks for your notice !