## Task B-1.3.

In an isosceles triangle, there are two circles. The first has a radius $R$ and touches all sides of the triangle, while the second has a radius $r$ and touches the legs of the triangle and the first circle. Determine the perimeter of the triangle.
## Solution.

![](https://cdn.mathpix.com/cropped/2024_05_30_c2de659189058fc448a1g-03.jpg?height=770&width=635&top_left_y=599&top_left_x=257)

Let the length of the height $|\overline{P C}|=h$.

Since $\overline{S_{1} M} \perp \overline{B C}$ and $\overline{S_{2} N} \perp \overline{B C}$, triangles $\triangle S_{2} N C$, $\triangle S_{1} M C$, and $\triangle B P C$ have congruent angles and are similar.

From the similarity, we get the following ratios:

$$
|P B|:|B C|=\left|S_{1} M\right|:\left|S_{1} C\right|=\left|S_{2} N\right|:\left|S_{2} C\right|
$$

i.e.,

$$
\frac{a}{2}: b=R:(h-R)=r:(h-2 R-r)
$$

From $R:(h-R)=r:(h-2 R-r)$, we get

$$
h=\frac{2 R^{2}}{R-r}
$$

From $\frac{a}{2}: b=R:(h-R)$, we get

$$
b=\frac{a(h-R)}{2 R}
$$

which, together with $(*)$, gives

$$
b=\frac{a(R+r)}{2(R-r)}
$$

In the isosceles triangle, we have $b^{2}=h^{2}+\frac{a^{2}}{4}$. Substituting $b$ and $h$ from $(*)$ and $(* *)$ into this equation, we get

$$
\frac{a^{2}(R+r)^{2}}{4(R-r)^{2}}=\frac{4 R^{4}}{(R-r)^{2}}+\frac{a^{2}}{4}
$$

From this, we obtain

$$
a^{2}=\frac{4 R^{3}}{r} \quad, \text { i.e., } \quad a=2 R \sqrt{\frac{R}{r}}
$$

Furthermore, substituting the obtained $a$ into $(* *)$ gives

$$
b=\frac{R \sqrt{R}(R+r)}{\sqrt{r}(R-r)}
$$

Then the perimeter of the triangle is

$$
o=a+2 b=2 R \sqrt{\frac{R}{r}}+2 \frac{R \sqrt{R}(R+r)}{\sqrt{r}(R-r)}=\frac{4 R^{2}}{R-r} \sqrt{\frac{R}{r}}
$$