Solution (source code)

= Solution

Isolate the <square root>: $\sqrt{x+16}=x-4$. A real solution must have $x\geq4$, because a real principal <square root> is nonnegative. Squaring gives $x+16=(x-4)^2$, hence $x(x-9)=0$. The candidate zero violates $x\geq4$; substitution verifies the other candidate. Thus
$$
\boxed{x=9.}
$$
The sign restriction prevents the extraneous solution introduced by squaring.