You will surely appreciate the simplicity of the problem once you get the solution.
Let’s draw a straight line between the two centers.
Clearly to move the center with maximum distance we need to rotate it around the intersection of the line and the circle with 180 degrees. So the maximum distance we can move the center each time is 2 * R. Let’s continue moving the center with 2 * R distance each time until the two circles intersects. Now obviously we can make the center moves into its final position by rotating it around one of the intersection points of the two circles until it reaches the final destination.
Every time we make the circle moves 2 * R times except the last move it’ll be ≤ 2 * R. Assume that the initial distance between the two points is d So the solution to the problem will be
You can have a look at my code below: