Left-inverse implies that $0 \longrightarrow M \longrightarrow N \longrightarrow \mathrm{coker}(\varphi) \longrightarrow 0$ splits. 
Let $\varphi : M \to N$ be an $R$-module homomorphism. Show that if $\varphi$ has a left-inverse, then $$0 \longrightarrow M \longrightarrow N \longrightarrow \mathrm{coker}(\varphi) \longrightarrow 0$$ splits.

Suppose that $\varphi$ has a left-inverse $\psi$. If I understood splitting correctly, then we are to show that $$M \oplus \mathrm{coker}(\varphi) \cong N.$$
So we need to define $$f : M \oplus \mathrm{coker}(\varphi) \to N$$ such that $f$ is an isomoprhism. The problem is that if we define $f$ such that $$(m, c) \mapsto \varphi(m) + c$$ the $c$ is actually an equivalence class of $N/\mathrm{im}(\varphi)$ and not an element of $N$. Is there a way to salvage this someway?
 A: If you want to define a map $M \oplus \mathrm{coker}\varphi \to N$ by $(m, [c]) \mapsto \varphi(m) + c$ for $c$ some representative of $[c]$, you'll run into an issue showing that this map is well-defined.
Instead, define $f: N \to M \oplus \mathrm{coker}\varphi$ by $f(n) = (\psi(n), q(n))$, where $q(n)=[n]$ is the projection $N \to \mathrm{coker}\varphi$. Denote $i: M \to M \oplus \mathrm{coker}\varphi$ and $p: M \oplus \mathrm{coker}\varphi \to \mathrm{coker}\varphi$ the canonical inclusions and projections coming with $M \oplus \mathrm{coker}\varphi$. The things we need to check are as follows (note that $f$ is certainly a homomorphism).
First, $f \circ \varphi(m) = (\psi\varphi(m), q\varphi(m)) = (m, 0) = i(m)$ since $\psi\varphi = 1_{M}$ and $q\varphi = 0$.
Second, $p \circ f(n) = p(\psi(n), q(n)) = q(n)$.
(These first two things we just showed is the commutativity of the two squares that must commute, mentioned by Mariano (and I am too lazy to bother making the diagram in Mathjax). So it remains to show that $f$ is an isomorphism.)
Third, $f$ is injective: Suppose $f(n) = (\psi(n), q(n)) = 0$. Since $q(n) = 0$ then $n = \varphi(m)$ for some $m \in M$, and then $0 = \psi(n) = \psi(\varphi(m)) = m$, so $m=0$ hence $n=0$.
Lastly, $f$ is surjective: Take an arbitrary element $(m, [n]) \in M \oplus \mathrm{coker}\varphi$. Setting $a = \varphi(m - \psi(n)) + n$ for some representative $n$ of $[n]$, we see that $\psi(a) = \psi(\varphi(m - \psi(n)) + n) = \psi\varphi(m) - \psi\varphi\psi(n) + \psi(n) = m - \psi(n) + \psi(n) = m$ and $[\varphi(m - \psi(n)) + n] = [n]$, so $f(a) = (m, [n])$.
It's probably worth noting two things: first, the "surjectivity" proof above can give you a hint for how you might actually want to define a map $M \oplus \mathrm{coker}\varphi \to N$ to give the splitting; second, this result/problem is a special case of the "splitting lemma."
