## Task A-2.2. (8 points)

In a right-angled triangle, the length of the altitude to the hypotenuse is $4 \mathrm{~cm}$, and the length of the median from the right angle vertex is $5 \mathrm{~cm}$. Determine the sum of the lengths of the legs of this triangle.
## Solution.

First method.

Let $S$ be the midpoint of the hypotenuse, and $N$ the foot of the altitude to the hypotenuse, with $|A C|<|B C|$. The point $S$ is the center of the circumscribed circle of triangle $A B C$, so $|A S|=|B S|=|C S|=5$.

![](https://cdn.mathpix.com/cropped/2024_05_30_59925bf190fc107f19b7g-06.jpg?height=343&width=671&top_left_y=1690&top_left_x=698)

Let $|N S|=x$. From the right triangle $C N S$, we get $x^{2}+4^{2}=5^{2}$, or $x=3 \text{ cm}$. Now, from the right triangles $A N C$ and $B N C$, we get:

$$
|A C|^{2}=(5-3)^{2}+4^{2}=20, \quad|B C|^{2}=(5+3)^{2}+4^{2}=80
$$

The lengths of the legs are $a=|B C|=4 \sqrt{5} \text{ cm}$ and $b=|A C|=2 \sqrt{5} \text{ cm}$. The sum of the lengths of the legs is $6 \sqrt{5} \text{ cm}$.

Second method.

Let $a$ and $b$ be the lengths of the legs, and $c$ the length of the hypotenuse of the triangle in question. The length of the median from the right angle vertex is half the length of the hypotenuse, so $c=10$.

The area of the right triangle can be expressed in two ways, $P=\frac{c \cdot v}{2}=\frac{a \cdot b}{2}$.

From this, we get $a b=40$.

In addition, $a^{2}+b^{2}=100$, so by solving the system, we can find $a$ and $b$.

Actually, we don't need $a$ and $b$, but only their sum, so we have:

$(a+b)^{2}=\left(a^{2}+b^{2}\right)+2 \cdot a b=100+2 \cdot 40=180$, and finally $a+b=6 \sqrt{5}$.

For 4 points: correct method with a calculation error.

For 8 points: correct result and method or correctly determined lengths of $a$ and $b$.