Let $G:=H \rtimes_{\phi} K$, $\phi: K \to \mathrm{Aut}(H)$ and is homomorphic. There is only one $p$-Sylow subgroup of $G$ (denoted by $P$). $p$ divides $|\phi(K)|$. Prove $p$ divides $|H|$.
*This is a homework question that I got stuck for a long while. I'm not looking for someone to solve this for me but any hint on how to use $p\mid|\phi(K)|$ will be appreciated. My attempt so far: $|G|=p^am$. Assume $H$ does not have $p$ as a prime divisor, $|K|=p^an$ so $P \unlhd K$. Then I don't know what to do. I tried many random things but I just can't see where contradiction lies
This is a nice problem.
To comment on your existing approach, I would note that you have deduced the conclusion $P \unlhd K$ from the much stronger hypothesis $P \unlhd G$. But $P \unlhd K$, by itself, is too weak to proceed further. You can see this by considering the example $H = C_2 \times C_2$, $K = C_3$, $p=3$. Let $\phi$ be a nontrivial action of $K$ on $H$ (it is easy to see that one exists). All the hypotheses are satisfied except $P \unlhd G$, while $P \unlhd K$ is true, yet the conclusion fails. So at some point, you will have to use the full hypothesis $P \unlhd G$ again.
The hypothesis $p\mid|\phi(K)|$ does not come in until later.
Here's the key lemma, which is not difficult to prove:
(Just to be clear: By definition, $H$ is always a normal subgroup of $H \rtimes_{\phi} K$; in the lemma, we're assuming that the other group, $K$, is normal.)
I'll let you take it from here.