Here's a problem I already solved.
Prove that a homomorphism $r: M \rightarrow N$ of right A-modules admits a section $v: N \rightarrow M$ if and only if $r$ is surjective and $M = L \oplus \operatorname{ker}(r)$ where $L$ is a submodule of $M$. Call this (*)
Now here's the problem.
Suppose that the sequence $0 \rightarrow L \rightarrow M \rightarrow N \rightarrow 0$ of right $A$-modules is exact, where $u: L \rightarrow M$ and $r: M \rightarrow N$.
Prove that the homomorphism $u$ admits a retraction $p: M \rightarrow L$ if and only if $r$ admits a section $v: N \rightarrow M$.
My try:
=>) This is the one that bothers me. Do we really need to assume $u$ is a retraction? by exactness of the sequence we have that $r$ is surjective. So define a section $v: N \rightarrow M$ as follows: for each $n \in N$ pick $m \in M$ such that $r(m) = n$. Set $v(n) = m$ then $r \circ v = 1_{N}$, so that $r$ admits the section $v$.
<=) Suppose $r: N \rightarrow M$ admits a section, then by (*) $M = \operatorname{ker}(r) \oplus \operatorname{Im}(v)$ and by exactness we have $M=\operatorname{Im}(u) \oplus \operatorname{Im}(v)$. Notice that by exactness we also have that $u$ is an injection. Define a retraction $p: M \rightarrow L$ as follows: given $m \in M$ write $m$ as $u(l)+v(n)$ where $l \in L$ and $n \in N$. Then set $p(m)=l$.
Since $M$ is a direct sum of $\operatorname{Im}(u)$ and $\operatorname{Im}(v)$ and $u$ is an injection we have that $p$ is well-defined and by construction $p \circ u = 1_{L}$ so that $p$ is a retraction of $u$.
Where is the mistake?