A farmer plans to build a rectangular pen against his barn. The pen will consist of 3 sides of fencing and he will use a portion of the barn wall for the fourth side of the pen. If this farmer has 150 feet of fencing, what is the maximum area he can enclose in his pen?

So the pen will have only 3 sides of fencing.

Let each of the 2 short sides be x
let the long side by y
2x + y = 150
y = 150 - 2x

Area = A = xy
A = x(150 - 2x) = -2x^2 + 150x

This is a downwards opening parabola, and the vertex will tell us
what the maximum area is , and for what x it will happen.

You must be studying how to find that vertex, the simplest is this:
the x of the vertex is -150/-4 = 75/2
then y = 150 - 2(75/2) = 75

max area = xy = (75/2)(75) = 5625/2 ft^2