Show that if $ \gcd(|G|,|H|) = 1 $, then $ \text{Aut}(G \times H) \cong \text{Aut}(G) \times \text{Aut}(H) $. Let $ G $ and $ H $ be finite groups. If $ \gcd(|G|,|H|) = 1 $, then I want to show that
$$
\text{Aut}(G \times H) \cong \text{Aut}(G) \times \text{Aut}(H).
$$
In my attempt, I first defined the map $ f: \text{Aut}(G) \times \text{Aut}(H) \to \text{Aut}(G \times H) $ by
$$
\forall (\phi_{G},\phi_{H}) \in \text{Aut}(G) \times \text{Aut}(H): \quad
f(\phi_{G},\phi_{H}) \stackrel{\text{def}}{=} \phi_{G} \times \phi_{H},
$$
but I don’t know how to use the fact that $ \gcd(|G|,|H|) = 1 $.

Automatically ${\rm Aut}(G)\times{\rm Aut}(H)\subseteq{\rm Aut}(G\times H)$. The gcd condition forces this to be an equality.
Let $\phi\in{\rm Aut}(G\times H)$. Show $\phi(G\times1)= G\times1$; argue $\subseteq$ by contradiction (show the order of an element outside of $G\times1$ is divisible by a factor of $|H|$...). Symmetrically, $\phi(1\times H)=1\times H$.
After that it is straightforward to check $\phi=(\phi|_G,\phi|_H)$, hence $\phi\in{\rm Aut}(G)\times{\rm Aut}(H)$.
