Let $G$ be a group and let $H,K$ be subgroups of $G$ such that $G=H \rtimes K$.
(i) Show that if $K \lhd G$, then $kh=hk$ for all $h \in H, k \in K$.
(ii) Deduce that $G$ is abelian if and only if $H,K$ are abelian and $K \lhd G$
I am completely lost with the exercise. First of all, the hypothesis is that $G$ is isomorphic to the external semidirect product of $H$ and $K$, but it doesn't say anything about the morphism $\rho:K \to Aut(H)$, I know that the external semidirect product multiplication is $(h_1,k_1).(h_2,k_2)=(h_1\rho(k_1)(h_2),k_1k_2)$. I don't know how to use the fact that $K$ is normal and the structure of the semidirect product in order to show (a) or (b), I would appreciate hints and suggestions to do both parts of the problem.