a) If a^p = b^p mod p, prove that a = b mod p
b) If a a = b mod p, prove that a^p = b^p mod p
#1: $\displaystyle b \equiv b^{p} \equiv a^{p} \equiv aa^{p - 1} \equiv \hdots \ (\text{mod } p)$ (Hint: Fermat's theorem)
#2: You can use the fact that if $\displaystyle a \equiv b \ (\text{mod }p)$ and $\displaystyle c \equiv d \ (\text{mod }p)$ then $\displaystyle ac \equiv bd \ (\text{mod } p)$. Then it's just a matter of considering $\displaystyle c = a$ and $\displaystyle d = b$
Do what o_O did.
Fermat's little theorem says $\displaystyle a^p \equiv a$ and $\displaystyle b^p \equiv b$.
Therefore we can replace $\displaystyle a^p$ by $\displaystyle a$ and $\displaystyle b^p$ by $\displaystyle b$ since they are congruent.
This leaves us with $\displaystyle a\equiv b$.