In triangle $A B C$, a circle is inscribed, touching sides $A B, B C, A C$ at points $M, D, N$ respectively. Find $M D$, given that $N A=2, N C=3, \angle B C A=60^{\circ}$.
Denote $B M=B D=x$ and apply the cosine theorem to triangle $A B C$.

## Solution

Denote $B M=B D=x$. Then

$$
A B=B M+A M=B M+A N=x+2 B C=B D+C D=B D+C N=x+3 .
$$

By the cosine theorem

$$
A B^{2}=A C^{2}+B C^{2}-2 A C \cdot B C \cos \angle C, \text { or }(x+2)^{2}=25+(x+3)^{2}-5(x+3) .
$$

From this equation, we find that $x=5$. Then $A B=7, B C=8$.

Applying the cosine theorem again to triangle $A B C$, we find that

$$
\cos \angle B=\frac{A B^{2}+B C^{2}-A C^{2}}{2 A B \cdot B C}=\frac{7^{2}+8^{2}-5^{2}}{2 \cdot 7 \cdot 8}=\frac{11}{14}
$$

The desired segment $M D$ is found using the cosine theorem in the isosceles triangle $M B D$:

$$
M D=\sqrt{B M^{2}+B D^{2}-2 B M \cdot B D \cos \angle B}=\frac{5 \sqrt{3}}{\sqrt{7}}
$$

![](https://cdn.mathpix.com/cropped/2024_05_06_16ab69fab1743849dba9g-59.jpg?height=426&width=694&top_left_y=965&top_left_x=682)

## Answer

$\frac{5 \sqrt{3}}{\sqrt{7}}$.