Line (R+x) is a common tangent to the two outer circles. A tangent is perpenmdicular to a radius, so (R+x) is perpendicular to the straight line (r+r) that connects the centers of the two outer circles.

And so, the triangle "(R+r)-(r)-(R+x)" is a right triangle, (R+r) being the hypotenuse.

Hence,

Let T = theta for less typing,

tanT = r/(R+x)

(R+x)*tanT = r

R+x = r/tanT

x = r/tanT -R ....(1)

Since you want x in terms of R only, then we eliminate "r" from (1).

Back to the same right triangle,

sinT = r/(R+r)

(R+r)sinT = r

R*sinT +r*sinT = r

R*sinT = r -r*sinT = r(1 -sinT)

r = R*sinT /(1 -sinT) ....***

Substitute that into (1),

x = [R*sinT /(1 -sinT)] /tanT -R

x = [R*sinT /(1 -sinT)] /[sinT /cosT] -R

x = [R*sinT /(1 -sinT)] *[cosT /sinT] -R

x = [R*cosT /(1 -sinT)] -R

x = R*[cosT/(1-sinT) -1]

x = R[(cosT -1*(1 -sinT))/(1 -sinT)]

x = R[(cosT -1 +sinT))/(1 -sinT)]

x = R(sinT +cosT -1)/(1 -sinT) ......(2)

----------

Since r = r, then (R+x) is a perpendicular bisector of the line (r+r). Then, angle theta is 1/2 of the central angle subtended by the said line (r+r).

This central angle, which is 2*theta, is also the central angle of the arc of the inner circle between the two points of tangency with the two outer circles.

----------

4.1) When n = 4, (in simplified form).

Subtended arc = 360/4 = 90 degrees

So, T = 90/2 = 45 degrees

Hence,

x = R(sinT +cosT -1) /(1 -sinT) ......(2)

x = R[(sin(45deg) +cos(45deg) -1) /(1 -sin(45deg)]

x = R[(1/sqrt(2) +1/sqrt(2) -1) /(1 -1/sqrt(2))]

x = R[(1 +1 -sqrt(2)) /sqrt(2)] /(sqrt(2) -1) /sqrt(2)]

x = R[(2 -sqrt(2)) /(sqrt(2) -1)] ....answer.

-------------

4.2) When n = 6 (?), in simplified form,

Subtended arc = 360/6 = 60 degrees

So, T = 60/2 = 30 degrees

Hence,

x = R(sinT +cosT -1) /(1 -sinT) ......(2)

x = R[(sin(30deg) +cos(30deg) -1) /(1 -sin(30deg)]

x = R[(1/2 +sqrt(3)/2 -1) /(1 -1/2)]

x = R[(1 +sqrt(3) -1*2) /2) /(1/2)]

x = R(sqrt(3) -1) ....answer.

-------------

4.3) When n = 12, correct to two decimal places,

Subtended arc = 360/12 = 30 degrees

So, T = 30/2 = 15 degrees

Hence,

x = R(sinT +cosT -1) /(1 -sinT) ......(2)

x = R[(sin(15deg) +cos(15deg) -1) /(1 -sin(15deg)]

x = R[0.2247 /0.7412]

x = 0.3032R

x = 0.30R ....answer.