16. Given real numbers $a, b, a>b>0$, place a rectangle of length $a$ and width $b$ inside a square (including the boundary). What is the minimum length of the side of the square?
16. Let the rectangle be $ABCD, AB=a, BC=b$, with the center at $O$. Establish a Cartesian coordinate system with $O$ as the origin, where the $x$-axis and $y$-axis are parallel to the sides of the rectangle.
(1) The line segment $BC$ does not intersect the coordinate axes. Assume $BC$ is in the first quadrant and $\angle B O X \leqslant \frac{1}{2}\left(90^{\circ}-\angle B O C\right)$. The side length of the square is $\geqslant BD \cdot \cos \angle B O X \geqslant BD \cdot \cos \frac{90^{\circ}-\angle B O C}{2} = BD \cos 45^{\circ} \cos \frac{\angle B O C}{2} + BD \sin 45^{\circ} \sin \frac{\angle B O C}{2} = \frac{\sqrt{2}}{2}(a+b)$.
(2) $BC$ intersects the coordinate axes. Assume it intersects the $x$-axis, and $\angle C O X \leqslant \frac{\angle C O B}{2}$. The side length of the square is $\geqslant AC \cdot \cos \angle C O X \geqslant AC \cdot \cos \frac{\angle C O B}{2} = a$.
$$
\text{The side length of the square} = \left\{\begin{array}{ll}
a, & a < (\sqrt{2}+1) b ; \\
\frac{\sqrt{2}}{2}(a+b), & a \geqslant (\sqrt{2}+1) b .
\end{array}\right.
$$