I am currently working through the chapters on injectivity in Donald Passman's A Course in Ring Theory, and have run into conceptual difficulty while attempting one of the exercises. I am trying to prove that a group homomorphism $\sigma:A\to B$, with both groups abelian, is injective or surjective iff $\hat\sigma:B^*\to A^*$ is surjective or injective respectively. For any abelian group $G$ we define $G^*=\operatorname{Hom}(G,\mathbb Q/\mathbb Z)$. We define $\hat\sigma(\theta)=\theta\sigma$ (function composition). For notational convenience let us here define $D:=\mathbb Q/\mathbb Z$
I have been able to prove most directions, but have not quite completed proving that $\sigma$ being injective means that $\hat\sigma$ is surjective. To that end I fixed some $\theta\in A^*$. Now as $\sigma$ is injective, $\sigma^{-1}:\sigma(A)\to A$ is well defined. Thus we can define the map $\phi:=\theta\sigma^{-1}:\sigma(A)\to D$. If we can extend $\phi$ to a map $\tilde\phi$ acting on all of $B$ then we'd be done, for $\hat\sigma \tilde\phi=\theta$. (In fact $\hat\sigma\phi=\theta$, but we do not know whether $\phi\in B^*$). Now I suspect that somehow I can use Baer's criterion to get the desired extension, because $D$ is a divisible group, hence injective. The crux of my problem lies in the fact that to use it in the form presented in Passman, I need $\sigma(A)$ to be somehow identified with a right ideal of the ring $\mathbb Z$, and $B$ with $\mathbb Z$ itself, but I am unsure how to do that. I would appreciate help in knowing why I can extend $\phi$.
If you know that $D$ is injective, then you know that $\operatorname{Hom}_{\mathbb{Z}}(-,D)$ is an exact functor. Thus if $0 \to A \to B$ is exact, then $B^* \to A^* \to 0$ is exact.