See how John solved the equation: $$ \sqrt{x-1+\sqrt{x+2}}=3,~x \in \mathbb{R} $$
(1) He squared both sides of the equation: $$x-1+\sqrt{x+2}=9$$
(2) He isolated the radical expression on the left side of the equation: $$\sqrt{x+2}=10-x$$
(3) He squared both sides of the equation again: $$x+2=100−20x+x^2$$
(4) Then he rearranged the terms and solved the resulting equation: $$ \begin{align} x^2−21x+98=0 \cr D=(−21)^2−4\cdot 1 \cdot 98=49 \cr x_{1,2}=\frac{−(−21)\pm \sqrt{49}}{2 \cdot 1} \cr x_1=14 \mathrm{~and~} x_2=7 \end{align} $$
(5) In response, John stated that the given equation has two solutions, $x_1=14$ and $x_2=7$.
The teacher asked students if the solution was correct and if the given equation really had two solutions. Here are some answers. Which one is right?
Kate thinks that John made an error in step (4). It should have been $$ \begin{align} x_{1,2}=\frac{-21\pm \sqrt{49}}{2\cdot 1} \cr x_1=-7 \mathrm{~and~} x_2=-14 \end{align} $$ and if we were to substitute $-7$ or $-14$ for $x$ in the original equation, we would always get the square root of a negative number. According to her, the equation has no solution.
Fred thinks that John made an error in step (3). It should have been $$ \begin{align} x+2=100−10x+x^2 \cr x^2−11x+98=0 \cr D =(−11)^2−4 \cdot 1 \cdot 98<0 \end{align} $$ which means that the equation has no solution.
Helena is convinced that the solution is not correct. John did not make the check. The equation has only one solution and that is $x=7$.
James disagrees with Helena. As for him, the equation has also the solution $x_1=14$: $L=\sqrt{14−1+\sqrt{14+2}}=\sqrt{13+(−4)}=\sqrt{9}=3=R$, (we can take $\sqrt{16}=\pm 4$), so everything is all right, and the equation has two solutions.
The check for $x=7$: $$ L=\sqrt{7-1+\sqrt{7+2}}=\sqrt{6+3}=\sqrt{9}=3,~R=3,~L=R. $$ The check for $x=14$: $$ L=\sqrt{14-1+\sqrt{14+2}}=\sqrt{13+4}=\sqrt{17},~R=3,~L\neq R. $$ Remember: The square root operation gives us only the positive square root! For example, $\sqrt{16}=4$, not both $-4$ and $4$, even though $(-4)^2=4^2=16$.