$$a^2 + a + 1 = 0$$ $$(a^2 + a+1) (a-1) = 0(a-1)$$ $$a^3 - 1 = 0$$ $$a^3 = 1$$
This is how I had solved the question by using the identity :- $$a^3 - b^3 = (a - b)(a^2 + b^2 + ab)$$
But the roots of the equation in question are complex :- $$x = \frac{-1}{2} \pm \frac{\sqrt 3i}{2}$$
I am not able to understand how this works.
I do believe the instructor posing this question wanted the student to observe that the polynomial $a^3-1$ factors into $$a^3-1 = (a-1)(a^2+a+1).$$ So if $a$ satisfies $a^2+a+1 = 0$ then $a$ must also satisfy $a^3-1=0$ or equivalently, $a^3=1$.
A slightly different way: From the equation $a^2+a+1=0$ one may derive the equation $$a(a^2+a+1) = a^3+a^2+a = a \cdot 0 = 0,$$ or in particular, $$a^3+a^2+a=0.$$ However, subtracting each side of the equation $a^2+a+1=0$ from the equation $a^3+a^2+a = 0$ gives $$a^3+a^2+a - (a^2+a+1) = a^3-1 = 0.$$ So adding $1$ to each side of this gives $a^3=1$.
There is, in the posing of this question, something special about the exponent $3$ here. If the teacher had asked for the value of $a^2$ instead of $a^3$ say, then there could be two possible values, one for each root of $a^2+a+1$.