This is the question:

Express the area of the rectangle shown in the accompanying figure as a function of the x-coordinate of the point P.

My attempt:

I know the area of a rectangle is A = xy

Since it needs to be a function of the x-coordinate, I need to find y in terms of x, so I can substitute it and have only 'x' as a variable. But I'm not sure how to calculate y.

Any assistance would be great.