I need help with starting the question below. I believe I have to use either intermediate-value or extreme-value theorems, however, I am not sure. The question is as follows:

Fix positive number P. Let R denote the set of all rectangles with perimeter P. Prove that there is a member of R that has maximum area. What are the dimensions of the rectangle of maximum area? HINT: Express the area of an arbitrary element of R as a function of length of one of the sides.

No idea where to begin. I understand it wants the max area and the sides of it. However, I don't know what to do.