>>11839583Note how A is at 3/2cm from the leftmost point of the bounding box, and B is 6/2cm from the rightmost from the bounding box. So all we need is the width of the bounding box to find the length of AB.
To get the width we need to know how much blue and green are shifted. Had they been stacked on top of each other, they would've had a height of 7cm, now they're shifted in a way that their combined height is 6cm. That means that blue's center point needs to be shifted down 1cm, then moved to the left until the circles meet.
Splitting the difference, we the intersection point is 1/2 cm down from the greens top point and 1/2cm up from the blue's bottom point. Meaning, 2sin(x_green)=1/2, x_green=pi/2, 3/2sin(x_blue)=1/2. x_blue=arcsin(1/3).
So, now to get the full width of the bounding box we get blue+green-(blue+green)_intesection+red = 7-(cos(x_blue)*3/2+cos(x_green)*2)+6= 13-sqrt(2)
So, |AB| = (13-sqrt(2)) - (3/2 + 6/2) = 17/2 - sqrt(2).