Two spheres, one of radius 2 and the other of radius 4, have the same centre. What is the edge size of the largest cube that fits between them? (AMC Senior, 2015)
diagram: https://i.stack.imgur.com/bMuix.jpg
I tried taking a cross-section of the shape, and used Pythagoras but kept getting the (same) wrong answer. The answer is $\frac {2}{3}(\sqrt 22 - 2)$.
To elaborate on Michael Rozenberg's answer, we can let $x$ be the side length of the cube, and draw a right triangle. One vertex, A, is at the center of the spheres. The second, B, is at the center of the outermost face of the cube. The third, C, is at one of the vertices of the cube that touches the outer sphere.
AB contains a radius of the inner circle and also extends through the center of the cube, so it has length $2+x$. C is on the outer sphere, so AC has length $4$ (this is the hypotenuse). BC extends from the center of a face to one of that face's vertices, so it is half of the diagonal of a square of length $x$. Thus it has length $\frac {\sqrt 2}2x$. From the Pythagorean theorem, we have:
$$(x+2)^2+\frac 12x^2=16$$
Here's a rough sketch: