4.1. Find the hypotenuse of a right triangle if the point of tangency of the inscribed circle divides one of the legs into segments of length $m$ and $n(m<n)$.

 untranslated text:
4.1. Найти гипотенузу прямоугольного треугольника, если точка касания вписанной в него окружности детит один из катетов на отрезки длиной $m$ и $n(m<n)$.
4.1. Let $P, N$ and $K$ be the points of tangency of the incircle with the sides of $\triangle ABC$ (Fig. 4.1). By the given condition, $KB = n, CK = m$, where $n > m$. Let $AB = x$; then $AN = AB - NB = x - n$. According to the Pythagorean theorem, we have $x^2 = (x - n + m)^2 + (m + n)^2; x^2 = x^2 + n^2 + m^2 -$

$$
-2xn + 2xm - 2mn + m^2 + 2mn + n^2
$$

$$
2(n - m)x = 2(m^2 + n^2).
$$

Thus, $AB = x = \frac{m^2 + n^2}{n - m}$.

![](https://cdn.mathpix.com/cropped/2024_05_21_1e3d8d2f6605ac23e2a5g-574.jpg?height=480&width=346&top_left_y=212&top_left_x=808)

Answer: $\frac{m^2 + n^2}{n - m}$.

Fig. 4.1