Understanding the difference between two theorems related to $|G\,:\,K|=|H\,:\,K|\cdot|G\,:\,H|$. I came across with the following two theorems:
First theorem:

Let $G$ be a finite group so $K\leq H\leq G$. Then $|G\,:\,K|=|H\,:\,K|\cdot|G\,:\,H|$.

Second theorem:

Let $G$ be a group so $K\leq H\leq G$ when both $H$ and $K$ have finite index. Then $|G\,:\,K|=|H\,:\,K|\cdot|G\,:\,H|$.

How the second theorem is different then the first one? If $G$ is finite then $H,K$ are finite and they have finite indexes. Is the second theorem is "sub-theorem" of the first one?
I proved the first one with Lagrange:
$$ \begin{cases}
|G|=|H|\cdot|G\,:\,H|\\
|H|=|K|\cdot|H\,:\,K|\\
|G|=|K|\cdot|G\,:\,K|
\end{cases}\Rightarrow|G\,:\,K|=|H\,:\,K|\cdot|G\,:\,H| $$
But as I understand I can't use the Lagrange on the second one. So how to prove the second one?
related thread.
 A: The difference is that in the second theorem you don't assume $G$ is finite. An infinite group can still have subgroups with finite index. For example $3\mathbb{Z}$ is a subgroup of $\mathbb{Z}$ of index $3$. 
And of course you can't use Lagrange's theorem for infinite groups. 
Edit: I'll give the idea how to prove that second theorem. Let's say $[G:H]=m,[H:K]=n$. Suppose $g_1H,...,g_mH$ are the different cosets in $G/H$ while $h_1K,...,h_nK$ are the different cosets in $H/K$. Now I say the collection $\{g_ih_jK: 1\leq i\leq m, 1\leq j\leq n\}$ are all the different cosets in $G/K$. The only thing which is left to prove is that any element of $G$ belongs to one of these $mn$ cosets and that all these cosets are different from each other. That will imply $[G:K]=mn$. So can you finish from here? 
A: As noted, the second version is more general than the first. In the first version, if $G$ is finite, then it follows that the indices are finite, and so the result would also follow from the second version of the theorem. But the second version applies in the case where $G$ is infinite, provided only that the indices be finite.
However, I would add that in fact there is an even stronger version! If we let $[G:H]$ denote the cardinality (finite or infinite) of the set of (left) cosets, then we have:

Theorem. Let $G$ be a group, not necessarily finite, and let $K\leq H\leq G$ be subgroups. Then $[G:K]=[G:H][H:K]$, in the sense of cardinality.

Proof. Let $[H:K]=\kappa$ and $[G:H]=\lambda$. Choose a complete set of coset representatives $\{h_{\alpha}\}_{\alpha\in\kappa}$ for $K$ in $H$, and a complete set of coset representatives $\{g_{\beta}\}_{\beta\in\lambda}$ for $H$ in $G$. I claim that the family $\{g_{\beta}h_{\alpha}\}_{(\alpha,\beta)\in\kappa\times\lambda}$ is a complete set of coset representatives for $K$ in $G$.
Indeed, first, we show they are pairwise incongruent on the left modulo $K$: if $g_{\beta}h_{\alpha}K = g_{\beta'}h_{\alpha'}K$, it follows that $h_{\beta}h_{\alpha}KH = g_{\beta'}h_{\alpha'}KH$. But $KH=H$, and $h_{\alpha}H=h_{\alpha'}H =H$, so this implies that $g_{\beta}H = g_{\beta'}H$. Since the $\{g_{\beta}\}$ are a complete set of coset representatives for $H$ in $G$, this implies that $\beta=\beta'$. Cancelling from $g_{\beta}h_{\alpha}K = g_{\beta'}h_{\alpha'}K$, we get $h_{\alpha}K=h_{\alpha'}K$, and since the $\{h_{\alpha}\}$ are a complete set of coset representatives for $K$ in $H$, this implies that $\alpha=\alpha'$. 
Thus, if $g_{\beta}h_{\alpha}K = g_{\beta'}h_{\alpha'}K$, then $g_{\beta}=g_{\beta'}$ and $h_{\alpha}=h_{\alpha'}$.
Second, we show that if $x\in G$, then there exists $\beta\in\lambda$ and $\alpha\in\kappa$ such that $xK = g_{\beta}h_{\alpha}K$. Indeed, we know that there exists $\beta\in\lambda$ such that $xH=g_{\beta}H$. In particular, $x\in  g_{\beta}H$, hence there exists $h\in H$ such that $x=g_{\beta}h$. Now, there exists $\alpha\in\kappa$ such that $hK = h_{\alpha}K$. Therefore, 
$$ xK = (g_{\beta}h)K = g_{\beta}(hK) = g_{\beta}(h_{\alpha}K) = (g_{\beta}h_{\alpha})K.$$
Thus, the set $\{g_{\beta}h_{\alpha}\}$ contains one and only one representative for each coset of $K$ in $G$.
Thus, we have:
$$ [H:K][G:H] = \kappa\lambda = \kappa\times\lambda  = [G:K],$$
as claimed. $\Box$
Note: this is the same argument as the one used in Dedekind's Product Theorem, that says that if $F\leq K\leq L$ are fields, then $\dim_{F}(L) = \dim_{K}(L)\dim_{F}(K)$, or equivalently, that $[L:F] = [L:K][K:F]$.
