my answer
is it correct
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'
h-\frac{p}{3}=x
\Rightarrow p=3(h-x)
Therefore,
perimeter=6(h-x)+2x
And,
Area=3x(h-x)