Let x represent the length of the side of the pen that is parallel to the barn. Then the area (y) will be .. y = x(300 -x)/2 This describes a downward opening parabola with zeros at x=0 and x=300. The vertex (maximum) will be found at the value of x that is halfway between those, x = 150.
For that value of x, the pen area is .. y = 150(300 -150)/2 = 150^2/2 = 11,250 . . . . . square feet.