How can I calculate the arc between two circles? The arc must be tangent to the two points on the circles.
Here is a picture illustrating it. I'm trying to code and calculate the orange arc and the blue arc.

The points B, F, D, and E can be changed by the user and dynamically update.
I'm going to ignore arc AC and address what determines arcs FD and BE based on the points A, B, C, D, E, and F.
If two circles with centers X and Y are tangent at P, then X, Y, and P are collinear. So, line AF and line CD both pass through the center of the circle containing arc FD and line AB and line CE both pass through the center of the circle containing arc BE.
If you have coordinates for all of these points, you can write equations of the line and algebraically find their points of intersection. Given the coordinates of the centers of the circles, you can determine their radii. Given the coordinates of the centers of the circles and the endpoints of the arcs, you can determine the measure of the central angles that subtend the arcs. From the radii and central angles, you can determine the arc lengths. (It's hard to be more specific without introducing a bunch of variables, but I can add more detail if you are not sure how to carry out any of these steps.)