$G$ is a subgroup of a finitely generated abelian group. So itself must be also finitely generated. $G$ cannot contain any non-zero torsion as $\mathbb{Z}^n$ doesn't either. So $G\cong \mathbb{Z}^k$ where $k$ is a non negative integer. $\mathbb{Z}^k\oplus \mathbb{Z}^m \cong \mathbb{Z}^{m+k}$ so it follows.