If $[G:K]$ is finite, then $[H:H \cap K] = [G:K]$ iff $G = HK$ (Hungerford Proposition 4.8, Proof) The following is from Hungerford's graduate algebra book, Chapter 1, Section 4, Proposition 8.  
The proposition states that: If $H$ and $K$ are subgroups of a group $G$, then $[H:H \cap K] \leq [G:K]$. If $[G:K]$ is finite, then $[H:H \cap K] = [G:K]$ if and only if $G = HK$.
I am trying to work my way through the proof (the book only provides an outline). I have show that $[H:H \cap K] \leq [G:K]$. I am now trying to show the second part, that $[H:H \cap K] = [G:K]$ if and only if $G = HK$. The outline says that to show this we prove two things:
1.) $[H:H \cap K] = [G:K]$ if and only if $f$ is surjective, where $f$ is the map given by $(H \cap K)h \rightarrow Kh$ (I have shown this part).
2.) $f$ is surjective if and only if $G = HK$. 
I am stuck on showing the second part. 
Thank you in advance for any help you can give.
 A: To say that $f$ is surjective is the same as saying that for every $g \in G$, there exists an $h \in H$ such that $Kh = Kg$.  What does it mean for the cosets $Kh$ and $Kg$ to be equal?
A: It may be helpful to remember which sets $f$ is a map between: namely the (right) cosets $\{(H \cap K)h\}$ of $H \cap K$ in $H$ and the (right) cosets $\{Kg\}$ of $K$ in $G$.
Clearly the set of cosets $\{Kh\}$ is a subset of the cosets $\{Kg\}$.
Now if $f$ is surjective, we are saying: $\bigcup\limits_{h \in H} Kh = \bigcup\limits_{g\in G} Kg = G$.
This means that for some elements $h_1,\dots,h_n \in H$, we have:
$G = Kh_1 \cup Kh_2 \cup \cdots \cup Kh_n$, and this is a disjoint union.
Thus every element of $G$ can be written as $kh$, with $k \in K$, and $h \in H$.
Since $g \mapsto g^{-1}$ is a bijection of $G$ with itself, we can thus write any element of $G$ as $(kh)^{-1} = h^{-1}k^{-1} \in HK$. Since $HK \subseteq G$ is obvious, this shows $G = HK$.
On the other hand, suppose $G = HK$. Since $G$ is a group, we have $G = HK = KH$. Splitting $G$ up into the (finite number of) right cosets $Kg$, we have:
$G = Kg_1 \cup Kg_2 \cup\cdots \cup Kg_n$, for some finite number of $g_i$.
Since $G = KH$, we can write each $g_i = k_ih_i$. But then $Kg_i = K(k_ih_i) = Kh_i$, and we see $f$ is surjective.
