# $\left[G:H\cap K\right]=\left[G:H\right]\left[G:K\right]$ if $\left[G:H\right],\left[G:K\right]$ are coprime

Let $G$ be a finite group and $H<G, K<G$.

I have shown that $\left[G:H\cap K\right]\leq\left[G:H\right]\left[G:K\right]$

But I do not know where to begin to prove the equality in case these indexes are coprime.

I'd appreciate it much if a hint could be given.

1) $[G: H \cap K] = [G:H][H: H \cap K] = [G:K][K: H \cap K]$.
2) if $a \vert bc$ and $gcd(a,b) = 1$, then $a \vert c$.
I would first show that $[G:H \cap K] = [G:H] \cdot [H : H\cap K]$.
First of all, you can consider a homomorphism between $H$$\times$$K$ to $G$ taking elements of the form $(h,k)$ to $hk$. Then consider the kernel of this homomorphism and try to apply first isomorphism theorem. Of course, for a full writing, firstly you should verify that the map we define is actually a well-defined group homomorphism.