If $A\cong B$ and $C\cong D$ how can I prove that $A/C\cong B/D$?

Let $A,B$ groups and $C\leq A$ and $D\leq B$. How can I prove that $A/C\cong B/D$ ? I tried as follow : Let $i:A\to B$ an isomorphism and $j:C\to D$ an isomorphism. I define $$\tau : A\to B/D$$ by $\tau(a)=f(a)+D$. The surjectivity is clear. For the injectivity, $$\tau(a)=0\implies f(a)\in D$$ Does this implies that $a\in C$ ? Since $f|_C :C\to D$ doesn't should be an isomorphism I'm not sure.

My second try would be to defined $f:C\to D$ an isomorphism and to prolong it to an isomorphism to $A\to B$, but is it possible ? If yes, then I can do my previous argument. If not, how can I do ?

• This is false in general but true if there is an isomorphism $f : A \to B$ such that $f(C) = D$.
– user171326
Feb 4, 2017 at 22:36

A finite counterexample: $A=B=\mathbb Z_4\times \mathbb Z_2$, and $C=\{(0,0),(0,1)\}$, $D=\{(0,0),(2,0)\}$.
Then $A/C$ is cyclic of order 4, but $B/D$ is the Klein 4-group.
This is false (so any proof is hopeless), take $A=B=\mathbb{Z}$ (with the addition) and $C=2\mathbb{Z};\ D=3\mathbb{Z}$. Then $|A/C|=2;\ |B/D|=3$.
$\mathbb Z/2\mathbb Z$ is not isomorphic to $\mathbb Z/3\mathbb Z$, although all of $A,B,C,D$ in this example are isomorphic.