A group of order $p^2$ has a subgroup of order $p$ 
Let $G$ be a group of order $p^2$, where $p$ is prime. Show that $G$ must have a subgroup order of order $p$.

What I have so far:
$$G^{p^2} =e .$$
If $G$ has an element $g$ of order $p^2$, then $g^p$ is of order $p$.  $\langle g^p\rangle$ is a subgroup of order $p$. 
$G$ must have an element $a$ of order $p$ by Lagrange's Theorem.  $\langle a\rangle$ is a subgroup of order $p$.
Is this sufficient?  Or am I missing some details?
 A: You are incorrect to claim that "$G$ must have an element $a$ of order $p$ by Lagrange's Theorem." 
Lagrange's Theorem says that if $H$ is a subgroup of $G$, then $|H|$ divides $|G|$. In particular, by letting $H=\langle x\rangle$, it says that if $x$ is an element of $G$, then $|x|$ divides $|G|$.
Lagrange's Theorem does not say that if $p$ divides $|G|$, then there is an element of $G$ of order $p$.
You are very close, though.
Let $x$ be an element of $G$ other than the identity. By Lagrange's Theorem, you know that the order of $x$ must divide $|G|=p^2$, and since the only divisors of $p^2$ are $1$, $p$, and $p^2$, that means that $|x|=1$, $p$, or $p^2$. If it is $p^2$, you can proceed as you did above. If it is $p$, you can proceed as you did above. So why is it that you cannot have $|x|=1$?
A: This follows from Cauchy's theorem. If $n$ is the group order and $p$ is a prime number dividing $n$, there is an element of order $p$ in $G$. In  your case, $n=p^2$. Thus, there is an element of order $p$. The subgroup generated by this element is thus (cyclic) of order $p$.
A: Why would you consider the center of the group? Then you will find it commutative.
