[ Law of Cosines

The center of the circle inscribed in a right triangle is at distances $\sqrt{5}$ and $\sqrt{10}$ from the ends of the hypotenuse. Find the legs.

#
Let $r$ be the radius of the circle with center $O$, inscribed in the right triangle $ABC$ with hypotenuse $AB$, $OA=\sqrt{5}, OB=\sqrt{10}$. Since $AO$ and $BO$ are the bisectors of the acute angles of the triangle,

$$
\angle AOB=90^{\circ}+\frac{1}{2} \angle ACB=90^{\circ}+\frac{1}{2} \cdot 90^{\circ}=135^{\circ}
$$

By the cosine rule,

$$
AB=\sqrt{OA^{2}+OB^{2}-2 OA \cdot OB \cos 135^{\circ}}=\sqrt{5+10+2 \cdot \sqrt{5} \cdot \sqrt{10} \cdot \frac{\sqrt{2}}{2}}=5
$$

The height of triangle $AOB$ from vertex $O$ is equal to $r$. Expressing the area of this triangle in two ways, we get

$$
\frac{1}{2} \cdot 5 r=\frac{1}{2} \cdot \sqrt{5} \cdot \sqrt{10} \cdot \frac{\sqrt{2}}{2}
$$

from which $r=1$. Let $M$ be the point of tangency of the inscribed circle of triangle $ABC$ with the leg $AC$. Then

$$
MC=OM=r=1, AM=\sqrt{OA^{2}-OM^{2}}=\sqrt{5-1}=2
$$

Therefore,

$$
AC=AM+MC=2+1=3, BC=\sqrt{AB^{2}-AC^{2}}=\sqrt{25-9}=4 .
$$

## Answer

$3 \times 4$.