<s>[INST] Find the solution to a system of equations Initially I'd like to solve the following problem:

Find $x$: $$x=\sqrt{2+\sqrt{2+\sqrt{2+\sqrt{2+x}}}}$$

I'm already aware of one approach to solve it, but now I wonder what if I set $y=\sqrt{2+\sqrt{2+x}}$
?
That is, to solve the following system:
$$ \begin{cases} x = \sqrt{ 2+ \sqrt{ 2+y }} \\ y= \sqrt{2+\sqrt{2+x}}  \end{cases}$$
 [/INST] I've just got an idea.
Let's suppose $x>y$, then $x=\sqrt{2+\sqrt{2+\sqrt{2+\sqrt{2+x}}}}=\sqrt{2+\sqrt{2+y}}<\sqrt{2+\sqrt{2+x}}=y$, which is impossible. When $x<y$ it's the same. Hence $x=y$.
As a result, $x=\sqrt{2+\sqrt2+x}\Rightarrow x^2=2+\sqrt{2+x}\Rightarrow x^4-4x^2+4=x+2\Rightarrow x^4-4x^2-x+2=0\Rightarrow$$\left(x^2+x-1\right)\left(x+1\right)\left(x-2\right)=0\Rightarrow x=2$.
If there's any mistake please tell me.
</s>