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!

Let $a = BC$, $b = AC$, $c = AB$ and $S$ the area of the triangle $ABC$ then $S = \dfrac{a b}{2}$.

*

* We have $a + b + c = 72$ then $a + b = 72 - c$ so :
$$(72 - c)^2 = (a + b)^2 = a^2 + b^2 + 2 a b = c^2 + 4 S$$
We deduce that :
$$4 S = (72 - c)^2 - c^2 = 5184 - 144 c \quad (1)$$

* We have :
$$S = \dfrac{1}{2} CD \times c = \dfrac{1}{2} (CM - 7) \times c$$
then :
$$4 S = (2 CM - 14) \times c = (c - 14) \times c = c^2 - 14 c \quad (2)$$

From $(1)$ and $(2)$ :
$$c^2 - 14 c = 5184 - 144 c$$
then :
$$c^2 + 130 c - 5184 = 0$$
The discriminant is $\Delta = 37636 = 194^2$ then :
$$c = \dfrac{-130 + 194}{2} = 32 \text{ or } c = \dfrac{-130 - 194}{2} = -162$$
We deduce that $c = 32$ because $c \geq 0$ then :
$$S = \dfrac{1}{4}(5184 - 144 c) = 144$$
