We have a wrench that is a regular hexagon with side length $a$, and we have a screw whose head is a square with side length $b$. What conditions must hold between $a$ and $b$ for us to be able to unscrew the screw with the wrench?
We can unscrew the screw with the key if, on the one hand, the head of the screw "fits" into the key, and on the other hand, if it cannot rotate inside it. The latter is only true if the diagonal of the square with side $b$ is greater than the diameter of the circle inscribed in the regular hexagon with side $a$, that is, if $b \sqrt{2} > a \sqrt{3}$.

We only need to examine how large a square can be placed inside a regular hexagon with side $a$. We can search for the "largest" square among those squares whose center coincides with the center of the hexagon. Indeed, for any square contained within the hexagon, we can find a congruent square with a central position that is also contained within the hexagon. To prove this, reflect any square contained within the hexagon about the center of the hexagon. The hexagon contains the reflected image, and due to the convexity of the regular hexagon, it also contains the convex hull of the square and its reflection. The central symmetry of the square implies that the reflected square can be obtained from the original by a translation. During the translation, the square moves within the aforementioned convex hull. Halfway through the translation, we find the desired square (Figure 1).

![](https://cdn.mathpix.com/cropped/2024_05_02_f89b6a66b1653d813aeeg-1.jpg?height=800&width=832&top_left_y=641&top_left_x=625)

Figure 1

Let us now determine the "largest" square. The centrally positioned square must also be contained within the hexagon rotated $90^{\circ}$ about its center. The intersection of the regular hexagon and its $90^{\circ}$-rotated version is a regular dodecagon. The longest diagonal of this dodecagon gives the diagonal of the "largest" square (Figure 2).

![](https://cdn.mathpix.com/cropped/2024_05_02_f89b6a66b1653d813aeeg-1.jpg?height=626&width=621&top_left_y=1704&top_left_x=730)

Figure 2

Accordingly,

$$
b \sqrt{2} = \frac{a \sqrt{3}}{\cos 15^{\circ}},
$$

which means

$$
b = a(3 - \sqrt{3})
$$

Summarizing our results: the screw can be unscrewed with the key if and only if

$$
\frac{\sqrt{3}}{\sqrt{2}} < \frac{b}{a} \leq 3 - \sqrt{3}
$$