Determine whether $\mathbb{Z}\times \mathbb{Z}$ and $\mathbb{Z}\times \mathbb{Z}\times \mathbb{Z}$ are isomorphic groups or not. Determine whether $\mathbb{Z}\times \mathbb{Z}$ and $\mathbb{Z}\times \mathbb{Z}\times \mathbb{Z}$ are isomorphic groups or not.
pf) Suppose that these are isomorphic. Note that $\mathbb{Z}\times \mathbb{Z}$ is a subgroup of $\mathbb{Z}\times \mathbb{Z}$ and $\mathbb{Z}\times \mathbb{Z}\times\left \{ 0 \right \}$ is a subgroup of $\mathbb{Z}\times \mathbb{Z}\times \mathbb{Z}$. Since $\mathbb{Z}\times \mathbb{Z}$ and $\mathbb{Z}\times \mathbb{Z}\times\left \{ 0 \right \}$ are isomorphic, $\mathbb{Z}\times \mathbb{Z}/\mathbb{Z}\times \mathbb{Z}$ and $\mathbb{Z}\times \mathbb{Z}\times \mathbb{Z}/\mathbb{Z}\times \mathbb{Z}\times \left \{ 0 \right \}$ are isomorphic. But the first one is isomorphic to the trivial group and the second one is isomorphic to $\mathbb{Z}$. It is a contradiction.
Is my proof right? If not, is there another proof?

Your proof is not quite correct - an (abstract) homomorphism $\mathbb{Z}^2 \to \mathbb{Z}^3$ need not send $\mathbb{Z}^2$ to $\mathbb{Z}^2 \times \{0\}$. Here's my preferred way of showing they are not isomorphic (and the argument generalizes):
For any abelian group $A$, the set of group homomorphisms $\text{Hom}(\mathbb{Z}, A)$ has the same cardinality as $A$ (a bijection is given by $a \leftrightarrow (1 \mapsto a)$). Combining this with the fact that $\text{Hom}(\mathbb{Z}^n, A) \cong A^n$ gives that $\text{Hom}(\mathbb{Z}^2, A)$ and $\text{Hom}(\mathbb{Z}^3, A)$ have different cardinalities (if $1 < |A| < \infty$).
