This is a theorem / proof from Rotman, and I am having a little trouble following it. I've reproduced the theorem and proof (proof is not verbatim) below.
Theorem: Let $p$ be a prime. A group $G$ of order $p^n$ is cyclic if and only if $G$ is an abelian group having a unique subgroup of order $p$.
Proof: If $G$ is cyclic then the result is immediate, so suppose the converse. Let $a \in G$ have maximal order $p^k$ for some $k$. Say $H$ is the unique subgroup of order $p$. Then $H \leq \langle a \rangle$. Suppose for the sake of contradiction that $\langle a \rangle \subsetneq G$. Then there is some $x \in G$ such that $x \not\in \langle a \rangle$ and $x^p \in \langle a \rangle$ (why?). Say $x^p = a^l$. If $k = 1$, then $x^p = 1$, which implies $x \in H \leq \langle a \rangle$ (why?), a contradiction. Now assume $k > 1$. Then $1 = x^{p^k} = \left( x^p \right)^{p^{k-1}} = a^{lp^{k-1}}$, and so $l = mp$ for some $m \in \mathbb{Z}$. Hence, $x^p = a^{mp}$, and so $1 = (x^{-1} a^m)^p$, which implies $x^{-1} a^m \in H$ (why?). Then $x \in \langle a \rangle$, again a contradiction.
I've put a 'why?' in parentheses at the places where I am stuck. My guess is this is something obvious, but I am not seeing it. Any help would be appreciated.
First why: Suppose instead that for every $x \in G -<a>,$ we have $x^p \notin <a>$. Let $x \in G-<a>$. Since $x^p \notin <a>$, it follows that $x^{p^2} \notin <a>$ (by exactly the same reasoning), and hence $x^{p^3} \notin <a>$, etc. So $x^{p^m} \notin <a>$ for all positive integers $m$. But $x \in G$ has order a power of $p$ (since the group has order a power of a prime), say $p^r$. So $x^{p^r} = 1 \in <a>$, which is a contradiction.