Refer to the image below. We see `a^2 + b^2 = R^2 , ` `( -x - r + a )^2 + ( b - r )^2 = r^2 , ` `b / a = r / ( r + x ) ` or `b / R = r / sqrt ( r^2 + ( x + r )^2 ) `

From these equations we obtain `b = ( rR ) / sqrt ( r^2 + ( x + r )^2 ) , ` `a = ( (r+x) R ) / sqrt ( r^2 + ( x + r )^2 ) ` and

`(x+r)^2 ( R / sqrt ( r^2 + ( x + r )^2 ) - 1 )^2 + r^2 ( R / sqrt ( r^2 + ( x + r )^2 ) - 1 )^2 = r^2 `

This after simplification gives `( R - sqrt ( r^2 + ( x + r )^2 ) )^2 = r^2 , ` so `R - sqrt ( r^2 + ( x + r )^2 ) = r ` and `( x + r )^2 = R ( R - 2r ) .`

At the right, we similarly obtain

`(q-x)^2 ( R / sqrt ( q^2 + ( q - x )^2 ) - 1 )^2 + q^2 ( R / sqrt ( q^2 + ( q-x)^2 ) - 1 )^2 = q^2 `

and `R - sqrt ( q^2 + ( q - x )^2 ) = q and (q-x)^2 = R(R-2q).`

Now recall that `q=2r, ` so opening the parentheses and subtracting we obtain `r = 2x -2/3R. ` Substitute it back and obtain `81x^2=17R^2, ` or `x = sqrt(17)/9 R.`

Finally, the quantity we need is `sqrt (R^2-x^2)=8/9R.`