I need some help to understand the proof of the following theorem:
Theorem If $A\subset X$ is a retract of $X$ then, $$H_n(X)\simeq H_n(A)\oplus H_n(X, A),$$ all $n\geq 0$.
Proof. Let $r:X\longrightarrow A$ be a retraction. Since $r\circ \imath=id_A$ it follows $r_*\circ \imath_*=id_{H_n(A)}$ hence $\imath_*$ is injective. Consider the exact homology sequence of the pair $(X, A)$: $$\ldots\longrightarrow H_n(A)\stackrel{\imath_*}{\longrightarrow} H_n(X)\stackrel{\jmath_*}{\longrightarrow} H_n(X, A)\stackrel{\partial}{\longrightarrow}H_{n-1}(A)\longrightarrow\ldots$$ Since $\imath_*$ is injective we find $\textrm{ker}(\imath_*)=0=\textrm{im}(\partial)$. But this says $\jmath_*:H_n(X)\longrightarrow H_n(X, A)$ is onto for all $n\geq 0$. In other words, for all $n\geq 0$, we have a short exact sequence $$0\longrightarrow H_n(A)\stackrel{\imath_*}{\longrightarrow} H_n(X)\stackrel{\jmath_*}{\longrightarrow}H_n(X, A)\longrightarrow 0,$$ which splits. Therefore, for all $n\geq 0$, $H_n(X)\simeq H_n(A)\oplus H_n(X, A)$.
Question: Where did the $0's$ in $0\longrightarrow H_n(A)\stackrel{\imath_*}{\longrightarrow} H_n(X)\stackrel{\jmath_*}{\longrightarrow}H_n(X, A)\longrightarrow 0$ come from?
We have ${\rm im}(\partial)=0$, so $\partial=0$ as map $H_n(X,A)\to H_{n-1}(A)$, so it factors through the zero object: $H_n(X,A)\to 0\to H_{n-1}(A)$. Extending the long exact sequence with these $0$'s will keep the exactness.
Anyway, injectivity of a map $f$ is equivalent to $\ker f=0$, i.e. $0\to A \overset{f}\to B$ is exact, and dually, surjectivity is equivalent to $A\to B\to 0$ being exact.