From first equation: [ (h - R)^2 + (x - R)^2 = (R + x)^2 ] [ (h - R)^2 + x^2 - 2Rx + R^2 = R^2 + 2Rx + x^2 ] [ (h - R)^2 - 2Rx = 2Rx ] [ (h - R)^2 = 4Rx ] [ h - R = 2\sqrt{Rx} \quad \Rightarrow \quad h = R + 2\sqrt{Rx} ]
Place the line as the x-axis: (y=0). Let circle (R) have center ((R, R)) — it touches the line at ((0,0)). Let circle (r) have center ((d, r)) with (d > 0), touching the line at ((d, 0)). sangaku math
Distance between centers of (R) and (r) = (R + r) (external tangency): [ \sqrt{(d-R)^2 + (r-R)^2} = R + r ] Simplify: [ (d-R)^2 + (r-R)^2 = (R+r)^2 ] [ (d-R)^2 + R^2 - 2Rr + r^2 = R^2 + 2Rr + r^2 ] [ (d-R)^2 - 2Rr = 2Rr ] [ (d-R)^2 = 4Rr ] [ d - R = 2\sqrt{Rr} \quad (\text{positive since } d > R) ] [ d = R + 2\sqrt{Rr} ] From first equation: [ (h - R)^2 +