Question:
For $0 \le x \le 40$ and $0 \le y \le 50,$ find the minimum value of
\[\sqrt{x^2 + 400} + \sqrt{y^2 + 900} + \sqrt{x^2 + y^2 - 80x - 100y + 4100}.\]

Answer:
Completing the square in $x$ and $y,$ the expression becomes
\[\sqrt{x^2 + 400} + \sqrt{y^2 + 900} + \sqrt{(x - 40)^2 + (y - 50)^2} = \sqrt{x^2 + 400} + \sqrt{y^2 + 900} + \sqrt{(40 - x)^2 + (50 - y)^2}.\]By QM-AM,
\begin{align*}
\sqrt{\frac{x^2 + 400}{2}} &\ge \frac{x + 20}{2}, \\
\sqrt{\frac{y^2 + 900}{2}} &\ge \frac{y + 30}{2}, \\
\sqrt{\frac{(40 - x)^2 + (50 - y)^2}{2}} &\ge \frac{(40 - x) + (50 - y)}{2},
\end{align*}so
\begin{align*}
&\sqrt{x^2 + 400} + \sqrt{y^2 + 900} + \sqrt{(40 - x)^2 + (50 - y)^2} \\
&\ge \sqrt{2} \cdot \frac{x + 20}{2} + \sqrt{2} \cdot \frac{y + 30}{2} + \sqrt{2} \cdot \frac{(40 - x) + (50 - y)}{2} \\
&= 70 \sqrt{2}.
\end{align*}Equality occurs when $x = 20$ and $y = 30,$ so the minimum value is $\boxed{70 \sqrt{2}}.$