Solution
400

Let $O$ be the centre of the left circle, $A$ be the top-left vertex of the square, $S$ be the point at which the left circle meets the tangent and $T$ be the foot of the perpendicular from $A$ to $O S$.
Let the square have side $2 x$.
For simplicity, we let $r$ denote the radius 1000 of the circles.
The line $A T$ has length $r-\frac{1}{2} \times 2 x=r-x$, since the common tangent to the circles (shown) is a line of symmetry of the square.
Considering $\triangle O A T$, we have $r^{2}=(r-x)^{2}+(r-2 x)^{2}$.
This leads to the quadratic $0=(5 x-r)(x-r)$, which has solutions $x=r$ and $x=0.2 r$.
Since $x<r$, we have $x=0.2 r=0.2 \times 1000=200$.
Therefore the square has side-length $2 \times 200=400$.
16. A square fits snugly between the horizontal line and two touching circles of radius 1000 , as shown. The line is tangent to the circles.
What is the side-length of the square?