Let $A$ and $B$ be free abelian groups and
$0\to A\to B\to\Bbb{Z}/p\to 0$
a short exact sequence.
Are $A$ and $B$ necessarily isomorphic?
The only examples I can come up with are of the form
$0\to \Bbb{Z}\xrightarrow{\cdot p}\Bbb{Z}\to\Bbb{Z}/p\to 0$
or very similar examples with groups of higher rank. I'm not asking whether the map $A\to B$ is an isomorphism, but if there exists some isomorphism $A\cong B$. I've heard that counterexamples can be built using large cardinals, but I don't know anything about cardinal theory. Any alternative or a detailed explanation with references about cardinals would be appreciated.