Smallest square containing the circles

Circle, Square
Three circles, A, B and C, have respective radii 2, 3 and 4. The circumference of C passes through the centre of B, and the centre of A lies on one of the intersection points of B with C. What is the side of the smallest square containing all circles?
Drag the point on the x-axis in graph window 1 to change x and see how the square in graph 2 is changing. The minimal solution is found at L.