So I'm trying to prove that if $G$ is an Abelian Group of rank $r$ (As $\mathbb{Z}$-module) then $G\otimes_\mathbb{Z}\mathbb{Q}$ is isomorphic to $\mathbb{Q}^r.$
Using the results I know about factorization of modules over PIDs, and the fact that the tensor product is distributive in respect to the direct sum, I restricted the problem to prove that $\frac{\mathbb{Z}}{(p^i)}\otimes_\mathbb{Z}\mathbb{Q}$ is isomorphic to $\mathbb{Q}$; where $p$ is a prime number.
Now, I can see how that tensor product has a Surjective morphism in $\mathbb{Q}$, and by writing the following short exact sequence
$$0 \longrightarrow (p^i) \longrightarrow \mathbb{Z} \longrightarrow \frac{\mathbb{Z}}{(p^i)} \longrightarrow 0$$
And tensorising with $\mathbb{Q}$ (which is flat, even though I wouldn't need the info since I only care about the end of the sequence) I get
$$0 \longrightarrow (p^i)\otimes_\mathbb{Z}\mathbb{Q} \longrightarrow \mathbb{Z}\otimes_\mathbb{Z}\mathbb{Q} \longrightarrow \frac{\mathbb{Z}}{(p^i)}\otimes_\mathbb{Z}\mathbb{Q} \longrightarrow 0$$
which is isomorphic to
$$0 \longrightarrow (p^i)\otimes_\mathbb{Z}\mathbb{Q} \longrightarrow \mathbb{Q} \longrightarrow \frac{\mathbb{Z}}{(p^i)}\otimes_\mathbb{Z}\mathbb{Q} \longrightarrow 0$$
So I have two surjections in $\mathbb{Z}$-$\mathsf{Mod}$:
$$\mathbb{Q} \rightarrow \frac{\mathbb{Z}}{(p^i)}\otimes_\mathbb{Z}\mathbb{Q}$$ $$\frac{\mathbb{Z}}{(p^i)}\otimes_\mathbb{Z}\mathbb{Q} \rightarrow \mathbb{Q}$$
My question is whether this is enough to say that the two are isomorphic or not. I know this doesn't work on $\mathsf{Set}$ and intuitively I can see this not being enough on generic modules if the operations were made to fit in the same counterexamples that we can make on $\mathsf{Set}$, but I might be wrong and the operation might be too restrictive.
(EDIT: It does work on $\mathsf{Set}$, sorry, I forgot about Schröder–Bernstein Theorem and I thought about it shallowly. This said I also know that having an inverse in $\mathsf{Set}$ of a Module homomorphism is enough to say that the inverse is an Homomorphism itself, thus saying that they both are isomorphisms. The problem is that I don't see a way to build an inverse in set even using the surjective version of Schröder–Bernstein. Also as some kind soul already made me notice any counterexemple shouldn't be finitely generated.)
Also, whether this works or not may I ask for a tip or two on how would you solve this problem?
EDIT: So, the person who wrote the exercise forgot to specify that $G$ was free, so the particular problem is solved and the morphism $$\frac{\mathbb{Z}}{(p^i)}\otimes_\mathbb{Z}\mathbb{Q} \rightarrow \mathbb{Q}$$ cannot be the canonic projection over $\mathbb{Q}$, so the abstract question doesn't apply in this case. So the only thing left is to know if, in general, given:
$$f: M \rightarrow N \\ g: N \rightarrow M$$ both $R$-Module surjective homomorphism ($R$ unitary commutative ring) there exist an isomorphism between the two or not necessarily.