12.1.2:
(a) For the first part, define f : Rn --> N by sending ei to xi for 1 <= i <=n. There exists such a homomporphism because Rn is free with basis {e1, ... , en}. f is onto because {x1, ... , xn} generates N, and the kernel of f is trivial because {x1, ... , xn} is linearly independent. For the second part, let y + N be a nonzero element of M/N. Then y is not in N. Since {x1, ... , xn} is a maximal independent set, {x1, ... , xn, y} is linearly dependent. Then there are ring elements r1, ... , rn, rn+1 such that r1x1+ ... rnxn + rn+1y = 0. Moreover rn+1 is not zero since {x1, ... , xn} is linearly independent. Then rn+1y is in N, hence rn+1(y + N) equals zero in M/N. Thus y + N is a torsion element of M/N.
(b) Let {x1, ... , xn} be a free basis for N, and let {y1, ... , yn+1} be a subset of M. Since M/N is torsion, it follows that for each i, 1 <= i <= n, there is a ring element ri such that ri yi is in N. Clearly N has rank n (since it is isomorphic to Rn, and R is commutative). Then {r1y1, ... , rn+1yn+1} is linearly dependent. Then there are ring elements s1, ... , sn+1 such that s1(r1y1) + ... + sn+1(rn+1yn+1) = 0, and this yields a dependence relation among y1, ... , yn+1, hence {y1, ... , yn+1} is linearly dependent. Thus M has rank n.
12.1.4:
Let {x1, ... , xr} be a maximal linearly independent set in the submodule N, and {y1+N, ... , ys+N} a maximal linearly independent set in the quotient M/N. First we claim {x1, ... , xr,y1, ... , ys} is linearly independent in M. Suppose t1x1+ ... + trxr + u1y1 + ... + usys = 0. Then u1y1 + ... + usys= - (t1x1+ ... + trxr) lies in N, so u1(y1 + N) + ... + us( ys+N) = 0 in M/N, so u1= ... = us= 0. Then t1x1+ ... + trxr = 0, so t1= ...= tr = 0. This proves the claim. Now, suppose x is in M. Then there is some nonzero r such that r(x+N) is in the submodule generated by {y1+N, ... , ys+N}. Then rx is in u1y1 + ... + usys+N for some ring elements u1, ... , us. Then rx = u1y1 + ... + usys+ t1x1+ ... + trxr for some ring elements t1, ... , tr. It follows that {x1, ... , xr,y1, ... , ys} is a maximal linearly independent subset of M, so that M has rank r + s.