Let $A$ be a commutative ring. If $M,N$ are $A$-modules (not necessarily finitely generated), and $\beta:M\longrightarrow N$ is surjective, prove that $$M\simeq\ker(\beta)\oplus\frac{M}{\ker(\beta)}\;\;.$$
($\oplus$ is the direct sum of A-modules).
This is a way to prove the following problem: let $$0\rightarrow L\stackrel{\alpha}{\rightarrow} M\stackrel{\beta}{\rightarrow} N\rightarrow0$$ be a short exact sequence of A-modules. Suppose that there exists $\rho:M\rightarrow L$ A-linear and surjective such that $\rho\circ\alpha=id_{L}$.
Then show that there exist a short exact sequence $$0\rightarrow L\stackrel{\xi}{\rightarrow} L\oplus N\stackrel{\eta}{\rightarrow} N\rightarrow0$$ (in which obiouvsly $L$ and $M$ must be considerated up to isomorphism and $\xi$ and $\eta$ are defined in the obviouvs way) and an isomorphism (and this is the tricky part) $$ \varphi:M\longrightarrow L\oplus N $$ such that the diagram you obtain by drawing the first sequence over the second, is commutative.
Proving the first thing I wrote is enough to do all remaining work. However what I'm interested in, is the solution of the exercise (that is the remaining part), hence, if someone is able to solve at least one of the two questions, I would be a happy guy! Thank you all!