I know how to directly prove that complex number is one of the cube roots of 1. But the textbook solution also gives another solution as shown below,
However, I don't understand how it jumps to the conclusion that $\frac{-1+\sqrt{3}i}{2}$ is a root of the quadratic equation following the two equations at the top. Thank you!

take $x=\frac{-1+\sqrt{3}i}{2}$ show that $x^3=1$ $$x=\frac12(-1+\sqrt{3}i)\\x^3=\frac{1}{8}((-1)^3+(\sqrt{3}i)^3+3(\sqrt{3}i)(-1)(-1+\sqrt{3}i))=\\ \frac18 (-1-3\sqrt3i+3\sqrt3i-9i^2)=\\\frac18(-1-9i^2)=\\\frac18(-1+9)=\\1$$ other method $$x^3-1=(x-1)(x^2-x+1)=0\\x=1\\x^2-x+1=0\\\to (x-\frac12)^2-(\frac14)+1=0\\(x-\frac12)^2=-(\frac34)\\(x-\frac12)=\pm\frac {\sqrt{-3}}{2}\\ (x-\frac12)=\pm\frac {\sqrt{3}i}{2}\\ x=\frac{1}{2}\pm\frac {\sqrt{3}i}{2}$$