<s>[INST] Solve the equation $\sqrt{x^2-9x+24}-\sqrt{6x^2-59x+149}=|5-x|$ Solve the equation $$\sqrt{x^2-9x+24}-\sqrt{6x^2-59x+149}=|5-x|$$

$x=5$ is the only real solution

We can note that $x^2-9x+24>0$ and $6x^2-59x+149>0$ for all $x$. The first thing I decided to try: as $$|5-x|=\begin{cases}5-x,x\le5\\x-5,x>5\end{cases},$$ we can look at two different cases based on the sign of $5-x$: let's $x>5$. Then the equation becomes $$\sqrt{x^2-9x+24}-\sqrt{6x^2-59x+149}=x-5\\\sqrt{x^2-9x+24}=x-5+\sqrt{6x^2-59x+149}\\x^2-9x+24=(x-5)^2+6x^2-59x+149+2(x-5)\sqrt{6x^2-59x+149}\\30x-3x^2-7=(x-5)\sqrt{6x^2-59x+149}$$ We have to raise both sides to the power of 2 again, so I decided to stop here.
Something else we can try is to raise both sides of the initial equation to the power of 2, as $|5-x|^2=(5-x)^2,$ so we have $$7x^2-68x+173-2\sqrt{(x^2-9x+24)(6x^2-59x+149)}=x^2-10x+25\\3x^2-29x+72=\sqrt{(x^2-9x+24)(6x^2-59x+149)}$$ I think it's obvious I am missing something.
 [/INST] Observe that
\begin{align*}
x^2-9x+24&=(x-5)^2+(x-5)+4\\
6x^2-59x+149&=6(x-5)^2+(x-5)+4
\end{align*}
Say $(x-5)^2+(x-5)+4=\alpha$ (note $\alpha \geq 0$), then we have
$$\sqrt{\alpha}-\sqrt{5(x-5)^2+\alpha}=|5-x|$$
The expression on the left is $\leq 0$ and that on the right is $\geq 0$. For the equality to hold, both have to be $0$.
Thus $x=5$ is the only solution.
</s>