$A\otimes \mathbf{Q}\cong B\otimes \mathbf{Q}$ implies $A$ and $B$ are $\mathcal{C}$-isomorphic I am trying to solve exercise 211 on Davis-Kirk:

Let $\mathcal{C}$ be the class of torsion abelian groups. Show that for any abelian groups $A,~B$, $A\otimes \mathbf{Q}\cong B\otimes \mathbf{Q}$ implies $A$ and $B$ are $\mathcal{C}$-isomorphic, that is,
there exists an abelian group $C$ and group homomorphisms $f:C\to A$, $g:C\to B$ such that $\ker f,\mathrm{coker} f$, $\ker g,\mathrm{coker} g$ are abelian torsion groups.

My attempt:
Consider the exact sequence
$$0\to\mathbf{Z}\to \mathbf{Q}\to \mathbf{Q}/\mathbf{Z} \to 0   $$
and the indcued exact sequence
$$0\to \mathrm{Tor}(\mathbf{Q}/\mathbf{Z},A)\to A\to \mathbf{Q}\otimes A \to \mathbf{Q}/\mathbf{Z} \otimes A \to 0 $$
It is tempting to take the map $A\to \mathbf{Q}\otimes A$ whose kernel and cokernel are all torsion groups. But the definition ask us to find a map whose target is $A$, not the source. Moreover, we cannot conclude $\mathrm{Tor}(\mathbf{Q}/\mathbf{Z},A)\cong \mathrm{Tor}(\mathbf{Q}/\mathbf{Z},B)$.
Besides from this "canonical map", I have no idea how to construct those two maps. Any hints and answer are welcome!
 A: Let $D$ denote both $A\otimes \mathbb{Q}$ and $B\otimes \mathbb{Q}$, and let $f: A\to D, g:B\to D$ denote the canonical morphisms. 
Let $p:C \to A, q:C\to B$ be the pullback of $f$ along $g$, that is, concretely $C=\{(a,b)\in A\times B \mid f(a)=g(b)\}$. 
Now let $x\in \ker p$. Then $x=(0,b)$ for some $b$ such that $g(b) =0$. But then $b$ is torsion, thus so is $x$. Symmetrically, we show that $\ker q$ is torsion. 
Let's now look at the cokernel : let $a\in A$. We wish to find $b\in B$ such that $g(b) = f(a)$. Of course it isn't always possible, but it's possible up to some torsion. 
Indeed $f(a) = a\otimes 1 = b\otimes \frac{1}{q}$ for some $b\in B, q\in \mathbb{N}_{>0}$. Therefore $qf(a) = b\otimes 1$ so that $(qa,b) \in C$ and therefore $qa\in \mathrm{im}\; p$, so that $a$ is torsion in $\mathrm{coker}\; p$.
Symmetrically, we show that $\mathrm{coker}\; q$ is torsion. 
Therefore both $p,q$ are $\mathcal{C}$-isomorphisms, and $A,B$ are $\mathcal{C}$-isomorphic. 
You can have fun by generalizing that and seeing that $\mathcal{C}$-isomorphism behaves nicely.
