Generally speaking, when you manipulate an equation by "doing the same thing to both sides", all you can say is that if your original equation was a true statement, then so is the new one. That doesn't always mean the new equation contains enough information to uniquely identify a solution of the original equation!
In this example, $x$ is a number such that $x = \sqrt{2+\sqrt{2+\dots}}$. (We happen to know this means that $x$ has to be 2.) Your conclusion is that $x$ has to be either $2$ or $-1$: that is a true statement! But it doesn't mean that $-1$ was a solution of the original equation.
As an analogy, suppose I have a marble in my pocket, and I tell you: "I have either a marble or a rhinoceros in my pocket." Then I have spoken truly!
Of course, in this case, you can easily verify (as an additional step) that 2 is a solution of the original problem and $-1$ is not. Since you know $x$ must be either $2$ or $-1$, all other possibilities are ruled out, and so you know $x=2$ must be the only solution.
Other manipulations can result in true statements that are even less informative. Suppose, for instance, that you multiplied both sides of the original equation by 0. You would get the new equation $0=0$. That is definitely a true statement, but it isn't very useful in solving the problem. So that was not a helpful manipulation to make and you should try something different.