Find the radius of the circle inside which are located two circles of radius $r$ and one circle of radius $R$ such that each circle touches the other two.

#
Let $x$ be the radius of the circle with center $O, O_1$ be the center of the circle with radius $R, O_2$ and $O_3$ be the centers of the circles with radius $r$, and $M$ be the point of tangency. The line of centers of two tangent circles passes through the point of tangency, so

$$
O O_1 = x - R, \quad O_2 O_3 = 2r, \quad O_1 O_2 = O_1 O_3 = R + r
$$

The median $O_1 M$ of the isosceles triangle $O_1 O_2 O_3$ is its height. From the right triangles $O_1 M O_2$ and $O M O_2$, we find that

$$
\begin{gathered}
O_1 M = \sqrt{O_1 O_2^2 - O_2 M^2} = \sqrt{(R + r)^2 - r^2} = \sqrt{R^2 + 2rR} \\
O M = \sqrt{O O_2^2 - O M^2} = \sqrt{(x - r)^2 - r^2} = \sqrt{x^2 - 2rx}
\end{gathered}
$$

Since $O_1 M = O O_1 + O M$, we get the equation

$$
\begin{aligned}
& \sqrt{R^2 + 2rR} = x - R + \sqrt{x^2 - 2rx} \Rightarrow \sqrt{R^2 + 2rR} + R - x = \sqrt{x^2 - 2rx} \Rightarrow \\
& \Rightarrow \left(\sqrt{R^2 + 2rR} + R - x\right)^2 = x^2 - 2rx \Rightarrow x = \frac{R\left(R + \varphi + \sqrt{R^2 + 2\varphi R}\right)}{R - \varphi + \sqrt{R^2 + 2\varphi R}}.
\end{aligned}
$$

## Answer

$R\left(R + \varphi + \sqrt{R^2 + 2\varphi R}\right)$

$R - \varphi + \sqrt{R^2 + 2\varphi R}$.