Showing a Mapping Between $\left\langle a,b \mid abab^{-1}\right\rangle$ and $\left\langle c,d \mid c^2 d^2 \right\rangle$ is Surjective Hypothesis: 


*

*Let 
$$
G \cong \left\langle a,b \mid abab^{-1}\right\rangle
$$
$$
H \cong \left\langle c,d \mid c^2 d^2 \right\rangle
$$

*Let the function $f$ be defined as follows.  First let $f(a) = cd$ and $f(b) = d^{-1}$.  For all other elements  $g$ of $G$, define $f(g)$ as follows:
$$
f(g) = f(a^{\alpha_1} b^{\beta_1} \cdot \ldots \cdot a^{\alpha_k}b^{\beta_k}) = f(a)^{\alpha_1} f(b)^{\beta_1} \cdot \ldots \cdot f(a)^{\alpha_k}f(b)^{\beta_k}
$$
such that $a^{\alpha_1} b^{\beta_1} \cdot \ldots \cdot a^{\alpha_k}b^{\beta_k}$ is the fully reduced and unique word representation of $g$ in $G$.  
Then $f$ is a well-defined mapping from $G$ to $H$.
Goal: Show that $f$ is an isomorphism.  As my attempt below will reflect, I know how to show that $f$ is a surjective homomorphism, however I don't know how to show that it is an injection.
Attempt:


*

*We need only check that $f(abab^{-1}) = e_H = c^2d^2$ in order for $f$ to be a homomorphism.  To do this we have
$$
f(abab^{-1}) = f(a)f(b)f(b)f(b)^{-1} = (cd)(d^{-1})(cd)(d^{-1})^{-1} = c^2d^2 = e_H
$$
as desired.

*To show that $f$ is surjective, we note that
$$
f(ab) = f(a)f(b) = (cd)(d^{-1}) = c
$$
$$
f(b^{-1}) = f(b)^{-1} = (d^{-1})^{-1} = d
$$
so that if $h = c^{\alpha_1}d^{\beta_1} \cdot \ldots \cdot c^{\alpha_k}d^{\beta_k}$ we have that 
$$
f\left((ab)^{\alpha_1}(b^{-1})^{\beta_1} \cdot \ldots \cdot (ab)^{\alpha_k}(b^{-1})^{\beta_k}\right) = c^{\alpha_1}d^{\beta_1} \cdot \ldots \cdot c^{\alpha_k}d^{\beta_k} = h
$$
as desired.
Question: Why is $f$ injective?
 A: An alternative way to do this is to show that the map $g:c \mapsto ab,\,d \mapsto b^{-1}$ extends to a homomorphism $g:H \to G$ (to do that, you just need to check that $g(c^2d^2)=1$), and then show that $fg:H \to H$ and $gf:G \to G$ are the identity maps on $H$ and $G$, which is easy: just check that they map the group generators to themselves. So $f$ and $g$ are $2$-sided inverse maps, and must be isomorphisms.
A: A different way to do this problem is to use Tietze transformations. These are specific transformations you can do to group presentations. The key result is that two presentations $\mathcal{P}$ and $\mathcal{Q}$ define isomorphic groups if and only if there exists a sequence of Tietze transformations which takes $\mathcal{P}$ to $\mathcal{Q}$. In this example we can do the following.
$$\begin{align*}
\langle a, b; abab^{-1}\rangle
&\cong \langle a, b, c; abab^{-1}, c=ab\rangle&\text{add in new generator }c\\
&\cong \langle a, b, c; ababb^{-2}, c=ab\rangle\\
&\cong \langle a, b, c; c^2b^{-2}, c=ab\rangle&\text{replace }ab\text{ with }c\text{ throughout}\\
&\cong \langle a, b, c; c^2b^{-2}, cb^{-1}=a\rangle\\
&\cong \langle b, c; c^2b^{-2}\rangle&\text{remove generator }a\\
&\cong \langle b, c, d; c^2b^{-2}, d=b^{-1}\rangle&\text{add in new generator }d\\
&\cong \langle b, c, d; c^2d^{2}, d=b^{-1}\rangle&\text{replace }b\text{ with }d^{-1}\text{ throughout}\\
&\cong \langle b, c, d; c^2d^{2}, d^{-1}=b\rangle\\
&\cong \langle c, d; c^2d^{2}\rangle&\text{remove generator }b\\
\end{align*}$$
et voila! The groups are isomorphic. Note that in practice you would just write the following.
$$\begin{align*}
\langle a, b; abab^{-1}\rangle
&\cong \langle a, b, c; abab^{-1}, c=ab\rangle\\
&\cong \langle a, b, c; c^2b^{-2}, cb^{-1}=a\rangle\\
&\cong \langle b, c; c^2b^{-2}\rangle\\
&\cong \langle c, d; c^2d^{2}\rangle\\
\end{align*}$$
I realise that this doesn't answer your specific problem, but thought you might be interested anyway :-)
A: Let's observe that an element in $G$ can be written as $a^nb^m$ for integers $n,m$. The relation $abab^{-1}=e\Rightarrow ba^{-1}=ab$ or $a^{-1}b=ba$. So given some word
$$a^{k_1}b^{k_2}...a^{k_{r-1}}b^{k_r}$$
we can always move the $a^{k_j}$ to the left of the $b^{k_{j-1}}$.
Then an arbitrary element in $G$ given by $a^nb^m$ mapped to $e$ by $f$ means
$$f(a^nb^m) = f(a)^nf(b)^m = (cd)^n(d)^{-m} = e \Rightarrow n=0, m=0$$
Basically, $(cd)^n(d)^{-m}$ cannot be made to be the identity using $c^2d^2=e$ without $m=n=0$.
Therefore the kernel of $f$ is trivial.
