How to find a point on the segment between two points which is x units from one of the endpoints? In the attached image there are two intersecting circles of differing size with centers A (0,0) and B (4,-4) and with radii of 3 and 5, respectively. The distance between A and B is shown to be 5.66, and there are two further points C and D which lie on the line segment between A and B as well on the circumference of A and B. How would one find the coordinates of C and D given the coordinates of A and B and the radii of the circles? It is known that C is 3 units from A since the radius is 3, and D is 5 units from B since the radius is 5. Sorry if this is not the best way to phrase the question.
The end goal is to find the midpoint of the overlapping region of the circles, which I am trying to find by finding the midpoint between C and D. This methodology will hopefully be expanded for 3 intersecting circles to find the midpoints of the then 4 overlapping regions.


The line segment AB has equation y=-x.
Point D is the intersection of the bottom circle (I will call it Circle B) and the line segment AB.
Circle B has equation (x-4)^2 + (y+4)^2 = 25.
So point D is on circle B and segment AB, so for the x,y coordinates of point D, both of the following are true equations:
y=-x
(x-4)^2 + (y+4)^2 = 25
Take the top equation and sub it into the bottom equation and solve:
(x-4)^2 + (-x+4)^2 = 25
x^2-8x+16 + x^2 -8x+16 = 25
2x^2-16x+32=25
2x^2-16x+7=0.
Now use the quadratic formula to find x.
Then use y=-x to find y, after you got x.
To find point C, use a similar method, except use the equation of Circle A.
