Given surjective Homomorphism $f:A \to B$ when $B$ is a free abelian group.
Prove: $A \cong \ker(f) × B$
I have seen this claim in the following link:
Abelian group admitting a surjective homomorphism onto an infinite cyclic group
But couldn't find any proof online. I have tried to prove it using the following claim but I don't think the same claim works for general $\mathbb{Z}^n$ https://yutsumura.com/surjective-group-homomorphism-to-z-and-direct-product-of-abelian-groups/
Please note that I haven't learned exact sequences yet.
Thank you for your help.