The sum of all real roots of the equation $$|x-2|^2 + |x-2| - 2 = 0$$ is?
I tried this problem by taking two cases $x<2$ and $x>2$ and solving the corresponding equations and I got $8$ as the answer, but in my book the author solves it by taking this equation as a quadratic in $x-2$ and gets $4$ as the answer. What's wrong with my way of solving this problem?