Konnō Hachimangū #1

This problem was posted at Konnō Hachiman shrine in Tokyo in 1824. It is located on the Sangaku Archive at [URL][color=rgba(0, 0, 0, 0.87)].[/color]
Statement
Three circles and a line are mutually tangent, as shown below. Find an equation that relates the radii of the three circles.

Información: Konnō Hachimangū #1