6. (4 points) Given three circles with radii 2, 3, and 5, each pair of circles touching each other externally at points $A, B$, and $C$. Find the radius of the inscribed circle of triangle $A B C$.
Answer: $\frac{9-\sqrt{21}}{2 \sqrt{7}}=\frac{9 \sqrt{7}-7 \sqrt{3}}{14}$

Solution:

Let's introduce the following notations: for the first circle, the center is point $O_{1}$, the radius is $a$; for the second circle, the center is point $O_{2}$, the radius is $b$; for the third circle, the center is point $O_{3}$, the radius is $c$. Since points $A, B, C$ are the points of tangency of two circles out of three, these points lie on segments $O_{1} O_{2}, O_{1} O_{3}, O_{2} O_{3}$. Without loss of generality, we can assume that point $A$ lies on segment $O_{2} O_{3}$, point $B$ - on $O_{1} O_{3}$, point $C$ - on $O_{1} O_{2}$. Then, by the cosine theorem for triangle $O_{1} O_{2} O_{3}$:

$$
\cos \left(O_{2} O_{1} O_{3}\right)=\frac{(a+b)^{2}+(a+c)^{2}-(b+c)^{2}}{2(a+b)(a+c)}=1-\frac{2 b c}{(a+b)(a+c)}
$$

Similarly, for the other two angles:

$$
\begin{aligned}
& \cos \left(O_{1} O_{2} O_{3}\right)=1-\frac{2 a c}{(a+b)(b+c)} \\
& \cos \left(O_{2} O_{3} O_{1}\right)=1-\frac{2 a b}{(a+c)(b+c)}
\end{aligned}
$$

Let's denote by $d$ the following expression: $d=\frac{\sqrt{a b c}}{\sqrt{(a+b)(a+c)(b+c)}}$.

By the cosine theorem from triangle $O_{1} B C$:

$$
B C=\sqrt{2 a^{2}-2 a^{2}\left(1-\frac{2 b c}{(a+b)(a+c)}\right)}=\sqrt{\frac{4 a^{2} b c}{(a+b)(a+c)}}=2 \sqrt{a} \sqrt{b+c} \cdot d
$$

Similarly, by the cosine theorem for triangles $O_{2} A C$ and $O_{3} A B$:

$A C=2 \sqrt{b} \sqrt{a+c} \cdot d$ and $A B=2 \sqrt{c} \sqrt{a+b} \cdot d$.

Then, by Heron's formula, where $S$ is the area of triangle $A B C$:

$$
\begin{aligned}
S^{2}= & d^{4}(\sqrt{a} \sqrt{b+c}+\sqrt{b} \sqrt{a+c}+\sqrt{c} \sqrt{a+b}) \cdot(-\sqrt{a} \sqrt{b+c}+\sqrt{b} \sqrt{a+c}+\sqrt{c} \sqrt{a+b}) . \\
& \cdot(\sqrt{a} \sqrt{b+c}-\sqrt{b} \sqrt{a+c}+\sqrt{c} \sqrt{a+b}) \cdot(\sqrt{a} \sqrt{b+c}+\sqrt{b} \sqrt{a+c}-\sqrt{c} \sqrt{a+b})= \\
= & d^{4}\left(-a(b+c)+(\sqrt{b} \sqrt{a+c}+\sqrt{c} \sqrt{a+b})^{2}\right)\left(a(b+c)-(\sqrt{b} \sqrt{a+c}-\sqrt{c} \sqrt{a+b})^{2}\right)= \\
& =d^{4}(2 b c+2 \sqrt{b} \sqrt{a+c} \sqrt{c} \sqrt{a+b})(-2 b c+2 \sqrt{b} \sqrt{a+c} \sqrt{c} \sqrt{a+b}) \\
= & d^{4}\left(4 b c(a+b)(a+c)-4 b^{2} c^{2}\right)=d^{4} 4 b c((a+b)(a+c)-b c)=d^{4} 4 a b c(a+b+c)
\end{aligned}
$$

Then $S=2 d^{2} \sqrt{a b c} \sqrt{a+b+c}$.

Thus, the radius of the inscribed circle can be calculated by the following formula, where $r$ is the radius of the inscribed circle of triangle $A B C$, and $p$ is the semiperimeter of triangle $A B C$:

$$
\begin{gathered}
r=\frac{S}{p}=\frac{2 d^{2} \sqrt{a b c} \sqrt{a+b+c}}{d(\sqrt{a} \sqrt{b+c}+\sqrt{b} \sqrt{a+c}+\sqrt{c} \sqrt{a+b})}= \\
=\frac{2 a b c \sqrt{a+b+c}}{\sqrt{(a+b)(a+c)(b+c)}(\sqrt{a} \sqrt{b+c}+\sqrt{b} \sqrt{a+c}+\sqrt{c} \sqrt{a+b})}
\end{gathered}
$$

Substitute the values of the radii of the circles from the condition and we get that the radius of the inscribed circle of triangle $\mathrm{ABC}$ is as follows:

$$
r=\frac{2 \cdot 2 \cdot 3 \cdot 5 \cdot \sqrt{2+3+5}}{\sqrt{5 \cdot 7 \cdot 8}(\sqrt{2} \sqrt{8}+\sqrt{3} \sqrt{7}+\sqrt{5} \sqrt{5})}=\frac{30}{\sqrt{7}(9+\sqrt{21})}=\frac{9-\sqrt{21}}{2 \sqrt{7}}=\frac{9 \sqrt{7}-7 \sqrt{3}}{14}
$$