Assume the parking lot is a rectangle with length x.
Its width must therefore be 900/x
Therefore the perimeter is twice the longer side plus twice the shorter side.
Perimeter P = 2x + 2(900/x)
Therefore P = 2x + 1800/x
From this equation it can be seen that, if x is small, P becomes very high because of the second term. Similarly if x is large, P also becomes high because of the first term. In between there is a value of x for which P becomes a minimum (minimum P, of course, means the shortest fence and the least cost).
To find the minimum of the P-x curve, you have to differentiate P with respect to x:
P = 2x + 1800/x
so: dP/dx = 2 - 1800/(x^2)
The minimum of the P-x curve is the point at which the slope (dP/dx) is zero.
Thus: 2 - 1800/(x^2) = 0
1800 = 2(x^2)
(x^2) = 900
and therefore x = 30
So the length is 30 and the width is (900/x) ... also 30.
It is indeed a square, but since a square is, by definition, rectangular, the problem is solved.