In what follows there is an error. The problem is that I can't find it. Let $$0\longrightarrow L\overset{f}{\longrightarrow} M\overset{g}{\longrightarrow}N\longrightarrow 0$$ be a short exact sequence of $R$-modules and $R$-module homomorphisms. Then we have
$$M\cong\operatorname{Ker}g\oplus M/\operatorname{Ker}g$$ $$=\operatorname{Im}f\oplus M/\operatorname{Ker} g$$ $$\cong L\oplus g(M)$$ $$=L\oplus N$$