I'm having a hard time showing an equality of indices holds. This is exercise 1.44 from Lang's Algebra.
Suppose f\colon A\to A' is a homomorphism of abelian groups, and $B\leq A$. Denote by $A^f$ and $A_f$ the image and kernel of $f$ in $A$ respectively, and similarly for $B^f$ and $B_f$. Show that $[A:B]=[A^f:B^f][A_f:B_f]$ in the sense that if two of these three indices are finite, so is the third, and the stated equality holds.
My initial thought was to compose a bijection from $A/B$ to $A^f/B^f\times A_f/B_f$. I tried to map a coset $aB$ to $(f(a)B^f,\underline{\hspace{.75cm}})$ but couldn't think of a nice candidate for the right coordinate.
Does anyone have suggestions on the right approach here? Thanks for your input.