Let $G$ be a finite group, $N$ a normal subgroup such that the orders of $N$ and $G/N$ are relatively prime. Suppose $G$ has a subgroup $H$ whose order is equal to the order of $G/N$. Show that $G$ is the semidirect product of $N$ and $H$. In addition, show that if $\varphi$ is any automorphism of $G$ then $\varphi(N)=N.$
Now because the order of $H$ and the order of $N$ are relatively prime we have that $H\cap N=\{e\}$. Also because $N$ is normal in $G$ we get that $HN$ is a subgroup of $G$. Since the order of $HN$ is equal to the order of $G$, this gives us that $G=HN$. All of this tells us that $G=N\rtimes H$.
The part I am having trouble showing is that for any automorphism of $G$, $\varphi$, we have that $\varphi(N) =N$.
Any help is greatly appreciated.
I would like to credit the comments made by Mariano Suarez-Alvarez in my coming up with this answer.
Let $\varphi \in \text{Aut}(G)$.
Let $n\in N$. Then $n=(n,e)$ in $G=N\rtimes H$ Now suppose $\varphi( (n,e) )=(n',h)$. Let $a$ be the order of $(n,e)$. Now because $\varphi$ is an automorphism, and therefore an isomorphism, the order of $(n', h)$ must be $a$. Therefore $(n', h)^a=(n'',h^a)=(e,e)$, where $n''\in N$.
This tells us that $h^a=e$. Now because $h\in H$ the order of $h$ must divide $|H|$, but $a \vert |N|$. Combined with the fact that $|H|$ and $|N|$ are relatively prime this tells us that the only way $h^a=e$ is if $h=e$. Thus $\varphi((n,e))=(n',e).$
This holds for all $n\in N$ so $\varphi[N] \subset N$, and therefore $\varphi[N]=N$.