Could someone please verify whether my solution is okay?
Prove that $\mathbb{Z}[i]$ is an integral domain.
Claim: $\Bbb{Z}[i]$ is a commutative ring.
Let $a+bi,c+di\in \Bbb{Z}[i]$. Then $(a+bi)(c+di)=ac+adi+cbi+bdi^{2}=ac+cbi+adi+bdi^{2}$ ($(\Bbb{Z}[i],+)$ is abelian) $=(c+di)(a+bi)$.
Claim: $\Bbb{Z}[i]$ has identity.
Since $0,1\in \Bbb{Z}$, $1+0i\in \Bbb{Z}[i]$ and for all $a+bi\in \Bbb{Z}[i]$, $(1+0i)(a+bi)=a+bi+a0i+obi^{2}=a+bi$.
Claim: For all nonzero $a+bi\in \Bbb{Z}[i]$, $(a+bi)(c+di)=(a+bi)(e+fi)$ implies $c+di=e+fi$.
Let $(a+bi)(c+di)=0$ or $(a+bi)(c+di)=(a+bi)0=0$. Since $a+bi\neq 0$, $c+di=0$. Then $a+bi$ cannot be a zero divisor.
This last part I am not sure is the best way to show no zero divisors.
Therefore, $\Bbb{Z}[i]$ is an integral domain.
I had a little trouble understanding the proof there are no zero divisors in $\Bbb Z[i]$ given in the text of the question.
OK, here's what I've got: if one accepts the cancellation property in $\Bbb Z[i]$, that $ab = ac$ with $a \ne 0$ implies $b = c$, then the proof that there are no zero divisors given in the text of the question is fine. The only problem is proving that; it turns out it is equivalent to having no zero divisors, so the logic runs in circles. Indeed, if $ab = 0$ implies $a = 0$ or $b = 0$ and we have $ab = ac$ with $a \ne 0$, then $a(b - c) = 0$ so $b = c$; if $ab = ac$, $a \ne 0$ implies $b = c$, then $ab = 0 = a(0)$ yields $b = 0$ so we have no zero divisors. So what is needed is a proof that there are no zero divisors based on the axioms of $\Bbb Z[i]$.
Here's a short proof based on the following observation:
If $0 \ne n \in \Bbb Z$ and $z \in \Bbb Z[i]$, then
$nz = 0 \Longrightarrow z = 0; \tag 1$
Proof: Before proceeding we observe that if $0 \ne w \in \Bbb Z[i]$ then $\bar w w \ne 0$, since we may write $w = \alpha + i \beta$, $\bar w = \alpha - i\beta$ and then $\bar w w = \alpha^2 + \beta^2 = 0$ if and only if $\alpha = \beta = 0$.
Bearing this fact in mind, we have
$z = \sigma + i \tau, \; \sigma, \tau \in \Bbb Z; \tag 2$
then
$0 = nz = n(\sigma + i \tau) = n\sigma + i n \tau; \tag 3$
and so
$n\sigma = n\tau = 0, \tag 4$
and since $n \ne 0$,
$\sigma = \tau = 0, \tag 5$
whence
$z = 0. \tag 6$
Now if $0 \ne w, z \in \Bbb Z[i]$ and
$wz = 0, \tag 6$
then
$(\bar w w)z = \bar w (wz) = \bar w (0) = 0; \tag 7$
but $0 \ne \bar w w \in \Bbb Z$, whence by the above $z = 0$, a contradiction.
Thus $Z[i]$ has no zero divisors and is thus an integral domain.