For $|G|=p^km$ for $p$ is prime and $p$ does not divide $m$. Let $H=[x\in G \mid x^{p^k}=e]$ for $H<G$ and let $K=[x\mid x^m=e] $ for $K<G$. We are not assuming G is abelian
Show that $H\cap K=\{e\}.$ Then show $H$ and $K$ are normal.
Note that $H\cap K$ is a subgroup of $H$ and $K$. Hence, by Lagrange's theorem, the size of $H\cap K$ divides $p^k$ and m. $(p^k,m)=1$ thus $H\cap K=\{e\}$
Then how does this mean that H and K are normal?
Note that, in general, $H$ and $K$ are not subgroups of $G$.
If you assume they are, then $H$ is a $p$-group and the order of any element in $K$ divides $m$. Since no power of $p$ divides $m$, an element in $H\cap K$ must have order $1$.
Recall that $(xyx^{-1})^r=xy^rx^{-1}$.