# How to prove the cosets are distinct?

In Fraleigh, an exercise asks to prove the following theorem: Suppose $H$ and $K$ are subgroups of a group $G$ such that $K \le H \le G$, and suppose $(H:K)$ and $(G:H)$ are both finite. Then $(G:K)$ is finite and $(G:K)=(G:H)(H:K)$.

If we let $\{a_iH\mid i=1,\dots,r\}$ be the collection of distinct left cosets of $H$ in $G$ and $\{b_jK\mid j=1,\dots,s\}$ be the collection of distinct left cosets of $K$ in $H$, then the set of left cosets of $K$ in $G$ is $\{(a_ib_j)K\mid i=1,\dots,r; j=1,\dots,s\}$.

My question is how do we show that these are distinct? If we suppose $a_ib_jK=a_pb_qK$, then $a_ib_jk_1=a_pb_qk_2$ for some $k_1,k_2$ in $K$. Then since $b_jk_1,b_qk_2 \in H$, it follows that $a_i$ and $a_p$ are in the same coset.

Now, where do I go from here? Just because they are in the same coset does not mean that $a_i=a_p$, right?

You are already through. You assumed at the beginning that $a_p$ and $a_q$ are in distinct cosets. You have now got a contradiction to that. So, $a_ib_jK\neq a_pb_qK$.
There is still one more thing that remains to be proved. You have to prove that every coset of $K$ in $G$ is of the type $a_ib_jK$.