Showing this function between homology groups is well defined From Rotman's Algebraic Topology

If $A$ is a retract of $X$, then $H_n(X)\approx H_n(A) \oplus H_n(X,A)$

If $r\colon X \rightarrow A$ is the retract with inclusion $i$, then define $f \colon H_n(X)\rightarrow H_n(A) \oplus H_n(X,A)$ by $z_n + B_n(X) \mapsto (rz_n + B_n(A), z_n + B_n(X) + S_n(A))$ because $B_n(X,A) = B_n(X) + B_n(A)$.  I've already shown $f$ is a homomorphism, but I'm having trouble finding an inverse and showing that it is well defined.
Let $g$ be the relation defined as $g \colon (z_n^A + B_n(A), z_n^X + B_n(X) + S_n(A)) \mapsto (iz_n^A + z_n^X) + B_n(X))$.
$g$ is a function iff $$(z_n^A + B_n(A), z_n^X + B_n(X) + S_n(A)) = (w_n^A + B_n(A), w_n^X + B_n(X) + S_n(A))$$ which implies 
$$iz_n^A + z_n^X + B_n(X) = iw_n^A + w_n^X + B_n(X)$$
But I'm having trouble showing this. I'm aware that there's a splitting lemma, but that lemma isn't introduced in the book until the next four chapters. So in this context, does anyone have any ideas how to proceed to show that $g$ is well defined?
 A: If $r\colon X \to A$ is the retraction and $j\colon (X, \emptyset) \to (X, A)$ is the inclusion of pairs then we can form the homomorphism $r_* \oplus j_*\colon H_n(X) \to H_n(A)\oplus H_n(X, A)$ by functoriality and the universal property of the direct sum. What you wrote down is well-defined because it is the same function. Proving that it is an isomorphism basically amounts to proving the splitting lemma in this case, which is actually not so bad.
Consider the long-exact sequence for the pair $(X, A)$
$$ \dots \to H_{n+1}(X, A) \stackrel{\partial}{\to} H_n(A) \stackrel{i_*}{\to} H_n(X) \stackrel{j_*}{\to} H_n(X, A) \stackrel{\partial}{\to} H_{n-1}(A) \to \dots $$
The retraction $r\colon X \to A$ gives a left inverse of $i_*$ (i.e. $r_*\circ i_* = id_{H_n(A)}$) so in particular $i_*$ is injective for all $n$ and the long exact sequence breaks up into short exact sequences for each $n$.
Consider the general case of a short exact sequence $A \stackrel{\alpha}{\to} B \stackrel{\beta}{\to} C$ of abelian groups which has a splitting $\pi \colon B \to A$ s.t. $\pi \circ \alpha = 0$. Then we have a homomorphism to the direct sum
$$\begin{align} \pi \oplus \beta \colon &B \rightarrow &A \oplus C \\
&b \mapsto & (\pi(b), \beta(b))\end{align}$$
It is straightforward to show this is injective, but to show surjectivity you need a trick. In order to hit $(a, c) \in A \oplus C$ you need an element of the form $b = \alpha(a) + x$, where $x$ is carefully chosen so that $x \in \beta^{-1}(c)$ and $\pi(x) = 0$. My hint is that for any $b\in B$ you can prove $\pi(b - \alpha\pi(b)) = 0$.
Once this lemma is proven, it follows that the homomorphism $r_* \oplus j_*$ above is an isomorphism.
