[tex](a-b)^2=a^2-2ab+b^2\ (*)\\------------------------------\\\\x^2-2x-1=0\\\\x^2-2x\cdot1=1\\\\\underbrace{x^2-2x\cdot1+1^2}_{(*)}-1^2=1\\\\(x-1)^2-1=1\\\\(x-1)^2=1+1\\\\(x-1)^2=2\Rightarrow x-1=-\sqrt2\ \vee\ x-1=\sqrt2\\\\\underline{\underline{x=1-\sqrt2\ \vee\ x=1+\sqrt2}}[/tex]