Theorem on abelian groups when the factor is free 
Lemma: Suppose that factor group $A/B=\bigoplus \limits_{i=1}^{n}(A_i/B)$ - direct sum, where $B$ - direct  addend in
  each subgroup $A_i$, i.e. $A_i=B\oplus J_i$. Then
  $$A=B\oplus\left(\bigoplus\limits_{i=1}^{n}J_i \right).$$
Theorem: Suppose that $A$ - abelian group, $B$ - subgroup of $A$. If the factor group $A/B$ is free then $A$ is direct sum of $B$ and
  free group $F^{ab}$, i.e. $A=B\oplus F^{ab}.$
Proof: Since $A/B$ - direct sum of infinite cyclic groups, then by lemma  it is enough to consider the case when $A/B\cong
 \mathbb{Z}$. Thus, $A/B=\langle \bar{a}\rangle \cong \mathbb{Z}.$
  Taking $0\neq a_0\in \bar{a}$ (element of coset $\bar{a}$, which does
  not lie in $B$). Then elements $ka_0$ be representatives of cosets
  $k\bar{a}$, $k=0,\pm 1,\pm 2,\dots,$ i.e.  $A=B\oplus \langle a_0\rangle
 $.

Let me ask you some questions which I was not able to answer by myself, please.
1) I spent some time in order to understand why it suffices to consider the case when $A/B\cong \mathbb{Z}$? How the lemma 4 is applied here? I mean since $A/B$ is free then $A/B=\bigoplus\limits_{i=1}^{n}a_i\mathbb{Z}$ but I am not able to understand what is $A_i, B$ and $J_i$ here with respect to the notations of lemma ?
2) I have shown that $A=B+\langle a_0\rangle$. But how to show that the sum is direct? In other words, $B\cap \langle a_0\rangle=\{0\}$? Suppose that $x$ lies in the intersection then $x=ka_0=b$ but I don't know what to do next?
I would be very grateful for help! I have spent some hours trying to write down everything accurately but nothing.
EDIT: Possible answer to question 2. We have shown that $A=B+\langle a_0\rangle$. In order to show that the sum is direct we have to show that $B\cap\langle a_0\rangle=\{0\}$. Suppose $x\in B\cap\langle a_0\rangle$ then $x=b=ka_0$ and since $a_0\in \bar{a}=a+B$ then $a_0=a+b'$ where $b'\in B$ then from $b=ka_0$ we have $b=ka+kb'$ hence $b'':=b-kb'=ka$ i.e. $ka\in B$ but since $\bar{a}=a+B$ has order infinite order then $k=0$. Thus $x=0$. Right?
 A: Elements of $A/B$ are cosets. In lemma we suppose that we can write all these cosets as direct sum of $A_{i} / B$, where $A_{i}$ is a subgroup of $A$ and $A_{i}$ has $B$ as a direct summand. This is applied to the situation in theorem as follows:
$\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\, A / B = \bigoplus\limits_{i=1}^{n}\mathbb{Z}$ (here we keep in mind that copies of $\mathbb{Z}$ are numerated)
$\,\,\,\,\,\,$It is enough to find $A_{i}$ as in lemma with $A_{i} = \mathbb{Z} \oplus B$. But now we can restrict ourselves to the case $\pi^{-1}(\mathbb{Z}) / B \cong \mathbb{Z}$, where $\pi: A \to A / B$ is a canonical projection and $\mathbb{Z}$ is the $i$-th copy of $\mathbb{Z}$ in $A / B$. This way we can find $A_{i}$ separatly. So this was the reduction to the case $A / B = \mathbb{Z}$.
$\,\,\,\,\,\,$About your second question: $ka_{0}$ is a representative of a coset $kB$ in $\mathbb{Z} = A / B$, so it is in $B$ only for $k = 0$, meaning that $\langle a_0\rangle \cap B = \lbrace 0\rbrace$.
