Hello,

Here's a problem which I'm unable to solve. I'd be grateful if you helped me through:

A rectangle with altitude x is inscribed in a triangle ABC with base b and altitude h. Express the perimeter P and area S of the rectangle as functions of x.

Answers are and

Thanks.