I'm currently reading "Algebra: Chapter 0" by Paolo Aluffi. Before I state my problem, I would like to give here the definition of split exact sequences from the book:
A short exact sequence
$0 \to M_1 \to N \to M_2 \to 0$
"splits" if there is a commutative diagram
in which the vertical maps are all isomorphisms.
Now, I'm having trouble with understandg a part of a given proof of the following proposition:
Let $\phi: M \to N$ be an injective $R$-module homomorphism. Then $\phi$ has a left-inverse(as a homomorphism, not a function) if and only if the sequence
$0 \to M \stackrel{\phi_1}{\rightarrow} N \to coker \ \phi \to 0$
splits.
Here is the proof from the book(I will state only the part I'm having trouble understanding with, that is, the "if" part of the statement):
If the sequence splits, then $\phi$ may be identified with the embedding of $M$ into a direct sum $M \oplus M'$, and the projection $M \oplus M' \to M$ gives a left-inverse of $\phi$.
Well, I'm a bit a lost here:
First of all, why $\phi$ can be identified with the embedding of $M \to M \oplus M'$? According to the definition above, it can be identidied with a surjective function $M'_1 \oplus M'_2$ where $M'_1 \cong M$ and $M'_2 \cong \frac{N}{im \ \phi} \cong coker \ \phi$

EDIT: Based on your comment I changed the answer slightly to solve the confusion...
The point is we have an injective map $\phi_1: M\to N$ and we are looking for a map (a retraction) $\rho: N\to M$ such that $\rho\phi_1 = \mathrm{id}_M$. Let $C=\mathrm{Coker}\phi_1$. The exact sequence $0\to M\xrightarrow{\phi_1} N\xrightarrow{\kappa} C\to 0$ is split (where $\kappa$ is the quotient map). So there are $R$-modules $M'_1, M_2'$ such that the diagram you drew is commutative with all the vertical maps isomorphisms. Let us put some names on these isomorphisms $\alpha: M\xrightarrow{\sim} M'_1$, $\beta: C\xrightarrow{\sim} M'_2$ and $\psi: N\xrightarrow{\sim} M'_1\oplus M'_2$.
(This part is new) First of all note that you also have an exact sequence $0\to M\xrightarrow{\imath} M\oplus C\xrightarrow{\pi}C\to 0 $ in addition to $0\to M'_1\xrightarrow{\imath'} M_1'\oplus M_2'\xrightarrow{\pi'}M_2'\to 0 $. Clearly $$ \imath' \circ \alpha = (\alpha\oplus\beta)\circ \imath, \quad \beta\circ\pi = \pi'\circ (\alpha\oplus\beta) $$ This means you can without loss of generality assume that $M'_1=M$, $\alpha=\mathrm{id}_{M}$, $M'_2=C$, $\beta=\mathrm{id}_C$ since 0\to M\xrightarrow{\imath} M\oplus C\xrightarrow{\pi}C\to 0$ also satisfies the conditions you listed in the definition of split exact sequence.
Consider the map $\rho:N\xrightarrow{\psi}M\oplus C\xrightarrow{\pi_M}M$ where the second map is the projection to $M$. The claim is $\rho\phi_1=\mathrm{id}_M$. Note that $\mathrm{Im}(\phi_1)\simeq M$ because $\phi_1$ is injective. Moreover this isomorphism is exactly $\psi$ itself. So take $x\in M$, then $\psi\phi_1(x)=(x,0)$. Hence $\rho\phi_1$ is indeed identity. It is in this sense that $\phi_1$ can be identified with the embedding $M\to M\oplus C$.