I want to use this and the fact that $H_n \cap H_m = \{1\}$ which I've already proved to show that $G \cong H_n \times H_m$
Since this are subgroups, and are the only subgroups like this, $H_n$ and $H_m$ are normal. Then $H_n H_m \triangleleft G$. Then, I show that $|H_n H_m| \geq nm$ by saying the following:
I have $n$ possible elections of $h_n \in H_n$ and $m$ possible elections of $h_m \in H_m$. Then if $|H_n H_m| < nm$, then it should be some $h_{n_1}, h_{n_2} \in H_n$ and $h_{m_1}, h_{m_2} \in H_m$ such that $h_{n_1}h_{m_1} = h_{n_2}h_{m_2}$, but this cannot be because $H_n \cap H_m = \{1\}$. Then $|H_nH_m| \geq nm$. Trivially, $|H_nH_m| \leq nm$, then $|H_nH_m|=nm$ so $G = H_nH_m$.
Is this correct?