We might as well put the barn at the bottom corner
of the corral.
We can get the answer very easily, since of all rectangles,
a square has the maximum area for any given perimeter. The
side of the barn adds 16' to the 280' of fencing, making the
perimeter 296'. So since the corral is a square, then each
side would be 296' divided by 4 or y=74'. However your teacher
would not accept that reasoning since no algebra is involved.
So I'll do it another way using algebra.
The area of the corral is
A = y(x+16)
and the fence, adding up the four parts is
(x)+(y)+(x+16)+(y) = 280
x+y+x+16+y = 280
2x+2y+16 = 280
2x+2y = 264 <--divide through by 2
x+y = 132
y = 132-x
So A = y(x+16) become
A = (132-x)(x+16)
A = 132x+2112-x2-16x
A = -x2+116x+2112
This is a parabola that opens down. So its vertex
will be a maximum. The formula for the x-value of the
vertex is
x = -b/(2a) = (-116)/[2(-1)] = 58
Therefore y = 132-x = 132-58 = 74, so the corral is
a 74 ft x 74 ft square, as we got without algebra above.
Edwin