Munkres' Section 67 Exercise 6 --- Rank of the subgroups of free abelian group with finite rank. This is from Munkres' Section 67 Exercise 6, which focuses on proving that

Any subgroup $B$ of a free abelian group $A$ with rank $n$ has rank at most $n$. 

The proof of this statement has been addressed here:Prove that any subgroup of a free Abelian group of rank $r$ is free Abelian of rank at most $r$. and some links over the internet. 
However, Munkres provided some guidance to help the readers to prove this claim by proving some sub-exercises. In other words, he stated as follows:

We can assume $A=\mathbb{Z}^{n}$, and let $\pi_{i}:\mathbb{Z}^{n}\longrightarrow\mathbb{Z}$ be projection on the $i^{th}$ coordinate. Given $m\leq n$, let $B_{m}$ consist of all elements $x$ of $B$ such that $\pi_{i}(x)=0$ for $i>m$. Then $B_{m}$ is a subgroup of $B$. Consider the subgroup $\pi_{m}(B_{m})$ of $\mathbb{Z}$. If this subgroup if nontrivial, choose $x_{m}\in B_{m}$ so that $\pi_{m}(x_{m})$ is a generator of this subgroup. Otherwise, set $x_{m}=0$. 
(a) Show $\{x_{1},\cdots, x_{m}\}$ generates $B_{m}$ for each $m$.
(b) Show that the nonzero elements of $\{x_{1},\cdots, x_{m}\}$ form a basis for $B_{m}$ for each $m$.
(c) Show that $B_{n}=B$ is a free abelian with rank at most $n$.

I have proved part (a) and part (c), but I am stuck in part (b).
Here is my attempt:
Firstly, if $x_{1}\neq 0$, then $\{x_{1}\}$ is clearly independent and by part (a) generates $B_{1}$ and thus a basis of $B_{1}$.
Suppose for some $k\geq 2$, $\{x_{1},\cdots, x_{k}\}$ has nonzero elements $\{x_{k,1},\cdots, x_{k,s}\}$ which form a basis for $B_{k}$, then if $x_{k+1}=0$, then the set $\{x_{1},\cdots, x_{k+1}\}$  has nonzero element $\{x_{k,1},\cdots, x_{k,s}\}$ which is hypothesized to be independent. But then how could I show $\{x_{k,1},\cdots, x_{k,s}\}$ generates $B_{k+1}$?
If $x_{k+1}\neq 0$, then the set $\{x_{1},\cdots, x_{k+1}\}$ has nonzero elements $\{x_{k,1},\cdots, x_{k,s}, x_{k+1}\}$, since $\{x_{k,1},\cdots, x_{k,s}\}$ generates $B_{k}$, by the proof of part (a), we see that $\{x_{k,1},\cdots, x_{k,s}, x_{k+1}\}$ generates $B_{k+1}$.  But how could I show they are independent?
Since the proof of part (b) relates to part (a), I will present my proof of part (a) below:
Every subgroup of $\mathbb{Z}$ is either trivial or infinite cyclic. Therefore, $\{x_{1}\}$ generates $B_{1}$. Now suppose $\{x_{1},\cdots,x_{k}\}$ generates $B_{k}$ for some $k\geq 2$. From the fact that $\pi_{k+1}(x_{k+1})$ generates $\pi_{k+1}(B_{k+1})$, we know that for every $x\in B_{k+1}$, there is some $n\in\mathbb{Z}$ such that $n\pi_{k+1}(x_{k+1})=\pi_{k+1}(x)$, but $n\pi_{k+1}(x_{k+1})=\pi_{k+1}(nx_{k+1})$, so that we have $\pi_{k+1}(nx_{k+1})-\pi_{k+1}(x)=\pi_{k+1}(nx_{k+1}-x)=0$, this implies $nx_{k+1}-x\in B_{k}$, and thus $nx_{k+1}-x$ can be generated by $\{x_{1},\cdots, x_{k}\}$, which implies that $x$ can be generated by $\{x_{1}, \cdots, x_{k+1}\}$. 
The proof is then concluded by inductions. 
So basically my confusion is above two questions, any idea? Thank you!
Edit 1:
Okay I think I figured it out, I will answer my own post. 
 A: Ok I figured it out, it turned out that (if my proof is correct) the proof is really cute.
Firstly, if $x_{1}\neq 0$, then $\{x_{1}\}$ is clearly independent and by part (a) generates $B_{1}$ and thus a basis of $B_{1}$.
Suppose for some $k\geq 2$, $\{x_{1},\cdots, x_{k}\}$ has nonzero elements $\{x_{k,1},\cdots, x_{k,s}\}$ which form a basis for $B_{k}$, then if $x_{k+1}=0$, then the set $\{x_{1},\cdots, x_{k+1}\}$  has nonzero element $\{x_{k,1},\cdots, x_{k,s}\}$ which is hypothesized to be independent. In particular, they can surely generate $x_{k+1}=0$, and thus they can generate $B_{k+1}$. Thus, they form a basis for $B_{k+1}$. 
If $x_{k+1}\neq 0$, then the set $\{x_{1},\cdots, x_{k+1}\}$ has nonzero elements $\{x_{k,1},\cdots, x_{k,s}, x_{k+1}\}$, since $\{x_{k,1},\cdots, x_{k,s}\}$ generates $B_{k}$, by part (a), we see that $\{x_{k,1},\cdots, x_{k,s}, x_{k+1}\}$ generates $B_{k+1}$. Now, observe that $\{x_{k,1},\cdots, x_{k,s}\}$ cannot generate $B_{k+1}$, since they are all elements have coordinates being $0$ at and after the $k^{th}$ coordinate, they can surely generate some element in $B_{k+1}$ (in fact they are elements in $B_{k+1}$), but they will miss some elements with the $k^{th}$ coordinate not being $0$ but with coordinate being $0$ starting from $(k+1)^{th}$. Thus, $\{x_{k,1},\cdots, x_{k,s}, x_{k+1}\}$ is the smallest generating set of $B_{k+1}$ and thus it is a basis of $B_{k+1}$.
The result then follows immediately by an induction on $k$. 
