I have a proof, but it doesn't seem to use the fact that $\text{gcd}(|H|,|K|)=1$, and I can't seem to see where my argument is wrong.
Here is what I did: Define the map $\iota: \text{Aut}(H) \times \text{Aut}(K) \hookrightarrow \text{Aut}(H \times K)$ by $(\varphi_H,\varphi_K) \mapsto \varphi_H \times \varphi_K \in \text{Aut}(H \times K)$ where $\varphi_H \times \varphi_K: H \times K \longrightarrow H \times K$ is given by $(h,k) \mapsto (\varphi_H(h),\varphi_K(k))$. Clearly $\iota$ is a monomorphism, so we only need to show that $\iota$ is onto. Let $\xi \in \text{Aut}(H \times K)$. Let $\pi_H: H \times K \longrightarrow H$ and $\pi_K: H \times K \longrightarrow K$ be the canonical projections, and define the maps $\varphi_H: H \longrightarrow H$ and $\varphi_K: K \longrightarrow K$ given by $\varphi_H(h) = \pi_H(\xi(h,e_K))$ and $\varphi_K(k) = \pi_K(\xi(e_H,k))$.
Suppose that $h_1=h_2$. Then $\xi(h_1,e_K) = \xi(h_2,e_K)$ and hence $\pi_{H}(\xi(h_1,e_K)) = \pi_H(\xi(h_2,e_K))$ since $\xi,\pi_H$ are well defined. Hence $\varphi_H$ is well defined. Also: $$\varphi_H(h_1h_2) = \pi_H(\xi(h_1h_2,e_K)) = \pi_H\bigg(\xi\big((h_1,e_K)(h_2,e_K)\big)\bigg)$$ $$= \pi_H \bigg(\xi(h_1,e_K)\xi(h_2,e_K) \bigg) = \pi_H(\xi(h_1,e_K))\pi_H(\xi(h_2,e_K)) = \varphi(h_1)\varphi(h_2).$$ Hence $\varphi$ is a homomorphism. Let $h \in H$ be arbitrary, and consider $(h,e_K)$. Since $\xi$ is an automorphism, there exists a $h' \in H$ such that $\xi(h',e_K) = (h,e_K)$, and thus $\pi_H(\xi(h',e_K)) = \pi_H((h,e_K)) = h$. Thus $\varphi_H$ is onto. Finally, suppose that $\varphi(h)=e_H$. Then $\pi_H(\xi(h,e_K)) = e_H$. Since $\pi_H|_{H \times \{e_K\}}$ is an isomorphism onto its image $H$, we conclude that $\xi(h,e_K)= (e_H,e_K)$. Since $\xi$ is injective, this implies that $h=e_H$. Hence $\varphi_H$ is an automorphism. Similarly $\varphi_K$ is an automorphism of $K$. Hence the map $\varphi_H \times \varphi_K$ is an automorphism with $\varphi_H \times \varphi_K = \xi$.
I'm not sure what I'm missing from this argument. Where am I going wrong? Thank you.
Hint
Any endomorphism of $G×H$ can be written as a $2×2$ matrix of the form $$\begin {pmatrix}\alpha \quad \beta \\\gamma\quad \delta\end {pmatrix}$$, with $\alpha $ an endomorphism of $G$, $\delta $ an endomorphism of $H$, $\beta: H\to G$ a homomorphism, and $\gamma: G\to H$ a homomorphism. See here.
Anyway, the condition on the orders of the groups means $\beta,\gamma $ are trivial.