Let $p$ be an odd prime and $G$ a group of order $p^3$. Prove that the $p$-th power map $x \mapsto x^p$ is a homomorphism $G \rightarrow G$.
The abelian case is easy. Suppose $G$ is non-abelian group. If $x \in G$ or $y \in G$ has order $p$, then $\phi(xy)=\phi(x)\phi(y)$. Thus, we can assume that $x,y$ are order of $p^2$.
That's what I did. I don't have any tools. I need your help.