Semidirect product with a $p$ group let $P$ be a finite $p$-group that acts on a finite group $G$ and assume that $P$ is maximal subgroup of $G \rtimes P$. Show that $G$ is an abelian $q$-group  for some prime $q$.
Hint: Show that $P$ stabilizes some sylow subgroup of $G$.
Thanks!
 A: New edit: I am going to rewrite the proof in a more unified way to cover both the cases where $p$ divides $|G|$ and when $p$ does not. Set $K = GP$ (for ease of notation: it is to be understood that $G \lhd K$, and that $P$ is acting on $G$ by the action specified in the given semidirect product). Note that, as the hint suggests, it suffices to find a non-identity Sylow $q$-subgroup $Q$ of $G$ which is normalized by $P$ (for some prime $q$ which may or may not equal $p$). For then $P$ normalizes the non-identity characteristic subgroup $Z(Q)$ of $Q$, so $PZ(Q)$ is  subgroup of $K$ which strictly contains $P$, so since $P$ is assumed to be maximal, we have $K = PZ(Q)$ and $G = Z(Q).$ 
We next note that if $p$ divides $|G|$, then $P$ permutes the Sylow $p$-subgroups of $G$ by conjugation. The number of these is congruent to $1$ (mod $p$) by Sylow's theorem, so one of them, $Q$ say, is fixed by $P$ in this action, that is, normalized by $P,$ and we have found the required Sylow subgroup of $G.$  
Hence we suppose from now on that $p$ does not divide $|G|$. Let $q$ be a prime divior of $|G|$. Now $P$ permutes the Sylow $q$-subgroups of $G$ by conjugation. The number of such Sylow subgroups is a divisor of $|G|,$ so is not divisible by $p,$ as we are now assuming that $|G|$ is not divisible by $p.$  Hence $P$ must have an orbit of length $1$ in this action: in other words, $P$ normalizes some Sylow $q$-subgroup $Q$ of $G$ in this case too. 
(It is also possible to produce a Sylow $q$-subgroup of $G$ normalized by $P$ by using the Frattini argument, which gives $K = GN_{K}(Q)$ for each Sylow $q$-subgroup $Q$ of $G$).
