For an assignment, we need to show that the inclusion functor $H:\mathsf{\bf Tor}\to \mathsf{\bf Grp}$ has a right adjoint, where $\mathsf{\bf Tor}$ is the category of all torsion groups, with group homomorphism. The book (Arbib's) indicates as a hint to look at the intersection of all subgroups containing all elements of finite order.
My initial thought was that the hint meant to say that that intersection of subgroups was the candidate for the cofree object of any $B\in \mathsf{\bf Grp}$. However, at no point are we making assumptions about the groups being abelian, so I think it's easy to sneak a torsion-free element into that intersection:
I know that in the group of square matrices it's possible to construct finite-order elements whose product has infinite order. So if my initial $B$ as above is that group of matrices, any subgroup that contains all elements of finite order will have at least one of infinite order as well, so the intersection will never be an element of $\mathsf{\bf Tor}$ as expected for the cofree object.
Then, this leaves me stumped. What exactly is this object of $\mathsf{\bf Tor}$ that is supposed to be the cofree object of a given $B\in\mathsf{\bf Grp}$? And what was the point of the hint given in the book?
The inclusion functor from torsion groups to groups does not have a right adjoint. This would imply that if $G$ is any group, then $G$ has a torsion subgroup $G'$ such that any homomorphism $T \to G$ from a torsion group $T$ to $G$ lands in $G'$. To see this, let $R$ be a putative right adjoint. Then $\text{Hom}(T, G) \cong \text{Hom}(T, R(G))$ naturally; in particular,
$$\text{Hom}(R(G), G) \cong \text{Hom}(R(G), R(G))$$
and the image of $\text{id}_{R(G)}$ in the LHS is a distinguished map $R(G) \to G$. Since every map $T \to R(G)$ factors through $\text{id}_{R(G)}$, it follows that every map $T \to G$ factors through the distinguished map $R(G) \to G$, and we can take $G'$ to be the image of this map.
As you observe, such a group $G'$ can't possibly exist in general. For example, we can take $G$ to be a group like $\langle a, b \mid a^2 = b^2 = e \rangle$ which is generated by its torsion elements but which has elements which are not torsion.
So the exercise as stated is wrong. Perhaps the author had only the abelian case in mind.