The circular base of a hemisphere of radius $3$ rests on the base of a square pyramid of height $5$. The hemisphere is tangent to the other four faces of the pyramid. What is the edge length of the base of the pyramid?
Let the base have edge $a$. Take the axial cross-section through the midpoints of two opposite base edges: it is an isosceles triangle with base $a$ and height $5$, and the hemisphere appears as a half-disk of radius $3$ centered at the midpoint $O$ of the base.
The half-disk is tangent to the slanted side, so the distance from $O$ to that side is $3$. The side has length $\sqrt{(a/2)^2+5^2}$ and the triangle with legs $\frac a2$ and $5$ has area $\frac12\cdot\frac a2\cdot5$, so $\frac a2\cdot5=3\sqrt{\left(\frac a2\right)^2+25}$.
Squaring: $25\cdot\frac{a^2}4=9\cdot\frac{a^2}4+225$, so $\frac{a^2}4\cdot16=225$ and $\frac a2=\frac{15}4$.