Let $f$ be a homomorphism defined on a finite group $G$, and let $H$ is the subgroup of $G$. Then show that $$ \left [f(G) : f(H)\right] \text{ divides } \left [G : H\right].$$
I know $$\left [G : H\right] = o(G)/o(H);$$
if $o(H) = n$ then $o(G) = kn$ so $o(G)/o(H) = k$.
Likewise $$ \left [f(G) : f(H)\right] = o(f(G)) / o(f(H)).$$
I am stuck here.
Is this the right way of doing this problem?