Let G be a group of order $|G|=pq^m$, where $p$ and $q$ are primes with $q^m<p$.
i) Use a Sylow counting argument to show that $G\cong C_p\rtimes_hQ$ where Q is a group with $|Q|=q^m$ and $h:Q\rightarrow Aut(C_p)$ is a homomorphism.
ii) Show further that if $q^m$ is coprime to $p-1$ then $G\cong C_p\times Q$.
I have done i), but I don't know how to do ii). I think I need to show that if $q^m$ is coprime to $p-1$ then the homomorphism is the trivial one, although i'm not sure how to do this. Or could i try and show that Q is then also normal in G and hence the semi direct product boils down to a direct product? Help would be appreciated.
Let $x \in Q$.
The order of $h(x)$ divides the order of $x$, hence divides $q^m$.
But $h(x) \in Aut(C_p) \cong C_{p-1}$, hence the order of $h(x)$ also divides $p-1$.
If $q^m$ and $p-1$ are co-prime, we deduce that the order of $h(x)$ is $1$ for any $x$. This means that $h$ is trivial, so that the semi-direct product is actually a direct product.