I'm not sure what you meant by "distance of 26 cm":

- Is this the distance between the centres?

- Is this the clear space between the pulleys?

I've attached a correct construction of the inner common tangent of 2 circles.

You are dealing with 2 similar right triangles. The ratio of distances of these triangles depends of the ratio of the two radii.