In the finite case, this is a fairly trivial application of Lagrange's Theorem. . Now if G is infinite it is perhaps surprising that this relationship still holds at first, but think about what Lagrange's theorem really tells you and it makes sense. [G:H] is simply the number of partitions of G into cosets (of equal size) of size |H|, then [H:K] is the number of partitions of H into cosets of size |K|. Then think of probability sort of reasoning why it makes sense why when looking to see how many cosets of size |K| we could split G into.