Let $p$ be a prime of the form $3k+2$. Show that if $x^3 \equiv 1 \pmod p$ then $x \equiv 1 \pmod p$. 
Let $p$ be a prime of the form $3k+2$. Show that if $x^3 \equiv 1 \pmod p$ then $x \equiv 1 \pmod p$.

What seems like and is probably an incredibly easy question and I'm struggling to get anywhere.
I've tried showing that since $p$ is prime and $p|x^3-1$ then either $p|x-1$ or $p|x^2+x+1$ so we're done if we can show that the latter case can never come about, however I'm struggling to show this. I'm doubtful this is the correct approach but I can't see anything else.
Any help is appreciated.
Thank you.
 A: Hint $\,\ {\rm mod}\,\ p\!:\,\ 1 \equiv x^{\large\color{#0a0}{ p-1}} \equiv x^{\large 1+3k}\equiv x(\color{#c00}{x^{\large 3}})^{\large k} \equiv x,\ $ by $\,\color{#c00}{x^{\large 3}\equiv 1}.\ \ $  QED
Said conceptually: $ $ the order of $\,x\,$  is $\,1\,$ since it divides the coprimes $\,\color{#c00}3\,$ and $\,\color{#0a0}{p\!-\!1} = 1+3k$
A: The approach is fine.  
You can exclude the  latter if you can show that  $x^2  +  x + 1 $ has no root modulo $p$. This is equivalent to its discriminant  not being a quadratic residue modulo $p$. And this in turn follows by the congruence condition on $p$.
A: If $p$ is prime and $p\mid x^3-1=(x-1)\left(x^2+x+1\right)$, then by Euclid's lemma either $p\mid x-1$ or $p\mid x^2+x+1$.
For contradiction, let $p\mid x^2+x+1$ and $p\equiv 2\pmod 3$.
If $p=2$, then $2=p\mid x^2+x+1=x(x+1)+1$, which is odd for all $x\in\mathbb Z$, contradiction.
If $p$ is odd, then $p\mid 4\left(x^2+x+1\right)=(2x+1)^2+3$, so $(2x+1)^2\equiv -3\pmod p$, so $-3$ is a quadratic residue mod $p$, but this contradicts Quadratic Reciprocity.
