L = building side
W = non-building side
P = 2W + L = 42 (note only one L because the other L is the building itself)
Solve for L:
L = 42 - 2W
Area = l*w
Area = (42-2W)W = 42W - 2W2
Let area be y, so y = -2W2 +42W
Note this is a parabola pointing down because the coefficient of the W2 is negative. That makes the vertex the maximum for which we are searching.
Vertex of this parabola is at W=-b/2a, if the quadratic is aW2 + bW + c = 0
a = -2
b = 42
W = -42/(2*-2) = -42/-4 = 10.5
W = 10.5
L = 42-2(10.5) = 42-21 = 21
Area = L*W = 21 * 10.5
A = 220.5 ft2