Let $H_1$ and $H_2$ be normal subgroups of $G$, we define the function $f:G \to G/H_1 \times G/H_2$, $f(g)=(gH_1, gH_2)$. If |G/H_i| is finite $i=1,2$ and $G.C.D.(|G/H_1|,|G/H_2|)=1$ then $f$ is epimorphism.
I have proved that $f$ is homomorphism and the kernel is $H_1 \cap H_2$, I take an arbitrary element $(aH_1,bH_2)$ from $G/H_1 \times G/H_2$ but I don't know how to use that $G.C.D.(|G/H_1|,|G/H_2|)=1$ to prove that there is an element $g \in G$ such that $gH_1=aH_1$ and $gH_1=bH_1$.
Given $a,b\in G$, we want to find $g\in G$ with $g\mapsto(aH_1,bH_2)$.
We know $a\mapsto (aH_1,aH_2)$ and $(|G/H_1|,|G/H_2|)=1$. The order of $aH_1$, $|aH_1|$, divides $|G/H_1|$ and $|aH_2|$ divides $|G/H_2|$ so $(|aH_1|,|aH_2|)=1$ and there exist integers $x,y$ with $x|aH_1|+y|aH_2|=1$.
Let $N=y|aH_2|=1-x|aH_1|$. Then $a^N\mapsto(aH_1,H_2)$.
Similarly there exists an integer $M$ with $b^M\mapsto(H_1,bH_2)$. Hence $a^Nb^M\mapsto(aH_1,bH_2)$.