I've attached a sketch. The complete track is drawn in red.

Actually you are dealing with a right triangle with the distance between the centers as hypotenuse. One leg of the right angle is the straight part of the track.

To calculate the two different arcs determine the angle which you can find inbothcircles.