<s>[INST] Right triangle with its perimeter and median and altitude A right triangle $ABC$ is given with $\measuredangle ACB=90^\circ$. If the perimeter of the triangle is $72$ and the difference between the lengths of the median and the altitude to the hypotenuse is $7$, find the area.

Let $CD=x$ $(x>0)$, then $CM=x+7$. By the Pythagorean theorem, it follows that $$MD=\sqrt{(x+7)^2-x^2}=\sqrt{14x+49}.$$
For the perimeter as $AM=MB=CM=x+7$ we have $$P_{ABC}=2x+14+a+b=72\Rightarrow a+b=58-2x,$$ where $BC=a,AC=b$.
We have to find $S_{ABC}=\dfrac{2(x+7)x}{2}=x(x+7)=x^2+7x$. I can't see how to do that.
On the other hand, if the sides of the triangle are $a,b$ and $c$, then $$\begin{cases}a+b+c=72\\\dfrac{c}{2}-\dfrac{ab}{c}=7\\a^2+b^2=c^2\end{cases}$$ and we only need to solve it for $\dfrac{ab}{2}$. I cannot do that as well. Thanks!
 [/INST] For the last three equations, there is a way to solve them.
$$a+b=72-c$$
$$a^2+2ab+b^2=5184-144c+c^2$$
$$2ab=5184-144c$$
Now, we know that:
$$\frac{c}{2}-\frac{ab}{c}=7$$
$$2ab=c^2-14c$$
$$c^2-14c=5184-144c$$
And that yields $c=32$ and $c=-162$, and obviously we'll use the positive value. Since we now have $c$, its very easy to calculate the rest
</s>