Solution (source code)

= Solution

Identify $G$ with the finite-index subgroup $f(G)\le H$. If $S$ is a finite generating set for $H$ and $T$ is a finite set of right-coset representatives, <Schreier's lemma> gives a finite generating set for $f(G)$, and hence for $G$.

Equip both groups with word metrics from finite generating sets. The inclusion is Lipschitz because each generator of $G$ has bounded length in $H$. Conversely, rewriting a word in $S$ by tracking its cosets through the finite set $T$ expresses an element of $G$ as a word of length bounded linearly in its $H$-length. Finally, every element of $H$ lies within the maximum word length of an element of $T$ from $f(G)$. Thus the inclusion is a <finite-index subgroup quasi-isometry>, and composing it with the isomorphism $f:G\to f(G)$ proves that $G$ and $H$ are quasi-isometric.