I am trying to prove that
$HK\approx H \times K$ iff $H,K \triangleleft G$ and $|H \cap K|=1$.
So the backwards direction is standard. However, the forward direction is giving me trouble. We are not given an epxlicit isomorphism between $HK$ and $H \times K$ which makes the matters more complicated.
What I have done so far:
$|HK|=\frac{|H||K|}{|H\cap K|}=|H||K|$ and so $|H\cap K|=1$ Now also we know either $H$ or $K$ is normal as otherwise $HK$ would not be a group. Now also note that $H,K$'s isomorphic copies are normal in $H \times K$ but this does not seem very helpful unless we know what the isomorphism is. If the isomorphism was the natural one, namely: $hk\to(h,k)$ then we would be done as preimage of a normal subgroup is normal. Thus $H,K$ would be normal in $G$.
Any hints would be appreciated!
The forward direction is not true. For example, let $X$ be a nonabelian group and let $G=X\times X$.
Let $H=\{(x,x)\in G\mid x\in X\}$ be the diagonal subgroup of $G$, and let $K=\{(x,1)\in G\mid x\in X\}$.
Note that $G=HK$ and $K\cong X\cong H$ so $HK\cong H\times K$, but $H$ is not normal in $G$ (this is where we use the hypothesis that $X$ is nonabelian).