$x$ is a cubic residue mod p if it is of the form $a^3\pmod{p}$ for some residue $a$. Show if $p\equiv 1\pmod{3}$, then $x\pmod{p}$ is a cubic residue iff $x^{(p-1)/3} \equiv 1\pmod{p}$. Also, show if $p\equiv 2\pmod{3}$, then all $x\pmod{p}$ are cubic residues.
For the forward implication, I can do this easily by assuming $x\equiv a^3\pmod{p}$ for some $1\leq a\leq p-1$. Then $x^{(p-1)/3}\equiv (a^3)^{(p-1)/3} \equiv a^{p-1} \equiv 1\pmod{p}$ by Fermat's Theorem since p is prime so $\textrm{gcd}\,(a,p)=1$.
For the reverse implication, this is what I have so far. If $p\equiv 1\pmod{3}$, then $p=3k+1$ for some integer $k$, so if $x^{(p-1)/3} \equiv1\pmod{p}$, then $x^{(3k+1-1)/3}\equiv1\pmod{p}$, so $x^k \equiv1\pmod{p}$. But this is where I'm stuck. I don't know if what I've done is useful or not.
Finally, I am stuck on the last part as well where $p\equiv2\pmod{3}$. I think I may want to use the fact that for some r, I can say that the set $\{r,r^2,r^3,...,r^{p-1}\equiv1\}$ is the same set $\pmod{p}$ as $\{1,2,3,...,p-1\}$, because then this set represents all possible values of $x$. But I'm not sure how to use this.