Is it true that if 3 does not divide $x$,
$$x\equiv k^2\mod 3 \iff x\equiv 1 \mod 3$$
If the above statement is correct , There are two parts to prove
$$x\equiv k^2\mod 3 \implies x\not\equiv 0 \mod 3$$ $$x\equiv k^2\mod 3 \implies x\not\equiv 2 \mod 3$$
How to prove them ?