Proof on cubic residues This problem is from "An Introduction to Number Theory" by Ivan Niven.
Define a to be a cubic residue if $x^3 \equiv a \mod p$ has solutions. Prove that if $p=3k+2 ,$ then every number that is in reduced residue system is a cubic residue. And if $p=3k+1$, only one-third of the reduced residues are cubic residues.I did find a solution here. But, I've not covered the portion in the book after section 2.5(self-study). I attempted the question in the following way and would appreciate any hints to reach to conclusion: 
As $B=\{1,2,\dots ,p-1\}$ is a reduced residue system, it should be enough to prove that $i^3 \equiv j^3\mod p \Rightarrow i\equiv j\mod p$. So, one part of it boils down to 
If $p=3k+2$, then show that $p \nmid i^2+j^2+ij $, if $i\neq j \wedge i,j \in B$. I have no idea how to use the $p=3k+2$ part for proving this.

If $p=3k+2$, then $3$ does not divide $p-1$ and so the map $x \mapsto x^3$ on $\mathbb Z/(p)$ is injective and so surjective because $\mathbb Z/(p)$ is finite.
Indeed, the map is a group homomorphism on $(\mathbb Z/(p))^{\times}$ with trivial kernel.
