Let $G$ be a finite group and $H$, $K$ normal subgroups of $G$. Prove that $G=HK$ if and only if $G/(H\cap K)$ is isomorphic to $G/H\times G/K$.
For first part i think I have to take the function $\phi\colon G\rightarrow G/H\times G/K$ defined by $\phi(g)=(gH,gK)$ then the kernel would be $H\cap K$ but I am confusion how to show this function is onto and how to use the fact $G=HK$?
For converse part since H and K be normal then $HK$ be a subgroup of $G$ so clearly $HK\subset G$ but now how to show that $G\subset HK$?
It will be enough if I get a proper hint for both part.Thank you.
HINT: For the first part, we know that $$|HK| = \frac{|H|\cdot |K|}{|H \cap K|}$$ So, what can we say about $|H \cap K|$ if $G = HK$ considering $HK \le G$? Also, the function $\phi$ you defined is not surjective unfortunately. Here, using $G = HK$, we can write any element of $g \in G$ as $g = hk$ for some $h \in H$ and $k \in K$ uniquely. Now, you may try to define it as $\phi: G \to G/H \times G/K$ such that $\phi(g) = (kH, hK)$. Then, $\phi$ is well-defined since $g = hk$ is a unique way to write $g$. Now, you can either check $\phi$ is a surjective homomorphism or check $\phi$ is injective and $|G| = |G/H \times G/K|$ (Since $|G|$ is finite, these two together imply $\phi$ is surjective).
For the second part, we can write $$\frac{|G|}{|H \cap K|} = \frac{|G|}{|H|}\cdot \frac{|G|}{|K|}$$ Then, what can we say about $|HK|$ considering the above hint for the first part?