Always draw a picture

The Point P is located at

The red box is one quarter of the area of the rectangle so

The domain is all values of the radicand(the stuff under the square root sign) is greater than or equal to zero.

when we test our values we get

To maximize the are we take the derivative of A(x)

setting the numerator equal to zero and solving we get

Since we are talking about a distance we use only the postive root.

Now when plugging this into to get the height of the box we get

So the base and the height of the rectangle are the same so it is a square.