The question is to evaluate $\sqrt{2+\sqrt{2+\sqrt{2+\sqrt{2+\cdots }}}}$ $$x=\sqrt{2+\sqrt{2+\sqrt{2+\sqrt{2+\cdots }}}}$$ $$x^2=2+\sqrt{2+\sqrt{2+\sqrt{2+\sqrt{2+\cdots }}}}$$ $$x^2=2+x$$ $$x^2-x-2=0$$ $$(x-2)(x+1)=0$$ $$x=2,-1$$

because $x$ is positive $x=2$ is the answer. but where did the $x=-1$ come from ?


$x=\sqrt{2+\underbrace{\sqrt{2+\sqrt{2+\sqrt{2+\cdots}}}}_{\text{$x$}}}$, so we get $x=\sqrt{2+x}$.

Now there is only one solution. If we square both sides, we add the case $-x=\sqrt{2+x}$


Well, if you set the square root to the negative one (instead positive by convention), the limit of the sequence $x = -\sqrt{2-\sqrt{2-\sqrt{2-...}}}$ will be $-1$. So by squaring you obtain answers for both of the possible square roots (the positive and the negative one)