If $z,w\in\mathbb{Z}[i]$ are such that $zw=1$ (i.e. $z$ is a unit and $w$ its inverse), then $|z|^2|w|^2=|zw|^2=1$, or
$$(a^2+b^2)(c^2+d^2)=1, \quad z=a+bi,\; w=c+di.$$
Now $a,b,c,d$ are all integers, so $a^2+b^2$ and $c^2+d^2$ must both be nonnegative integers, which must both equal exactly $1$ and no greater in order to multiply to $1$ in the integers. And if $a^2+b^2=1$, we have $a^2$ and $b^2\le1$. Check by hand the only solutions here correspond to $(a,b)=(\pm1,0)$ or $(0,\pm1)$.
Now is a very good time for a quick foray into the ideal-theoretic version of Sun-Ze (better known as the Chinese Remainder Theorem). Let $R$ be a commutative ring with $1$ and $I,J\triangleleft R$ coprime ideals, i.e. ideals such that $I+J=R$. Then
$$\frac{R}{I\cap J}\cong\frac{R}{I}\times\frac{R}{J}.$$
First let's recover the usual understanding of SZ from this statement, then we'll prove it. Thanks to Bezout's identity, $(n)+(m)={\bf Z}$ iff $\gcd(n,m)=1$, so the hypothesis is clearly analogous. Plus we have $(n)\cap(m)=({\rm lcm}(m,n))$. As $nm=\gcd(n,m){\rm lcm}(n,m)$, if $n,m$ are coprime then compute the intersection $(n)\cap(m)=(nm)$. Thus we have ${\bf Z}/(nm)\cong{\bf Z}/(n)\times{\bf Z}/(m)$. Clearly induction and the fundamental theorem of arithmetic (unique factorization) give the general algebraic version of SZ, the decomposition ${\bf Z}/\prod p_i^{e_i}{\bf Z}\cong\prod{\bf Z}/p_i^{e_i}{\bf Z}$.
(How this algebraic version of SZ relates to the elementary-number-theoretic version involving existence and uniqueness of solutions to systems of congruences I will not cover.)
Without coprimality, there are counterexamples though. For instance, if $p\in\bf Z$ is prime, then the finite rings ${\bf Z}/p^2{\bf Z}$ and ${\bf F}_p\times{\bf F}_p$ (where ${\bf F}_p:={\bf Z}/p{\bf Z}$) are not isomorphic, in particular not even as additive groups (the product is not a cyclic group under addition).
Now here's the proof. Define the map $R\to R/I\times R/J$ by $r\mapsto (r+I,r+J)$. The kernel of this map is clearly $I\cap J$. It suffices to prove this map is surjective in order to establish the claim. We know that $1=i+j$ for some $i\in I$, $j\in J$ since $I+J=R$, and so we further know that $1=i$ mod $J$ and $1=j$ mod $I$, so $i\mapsto(I,1+J)$ and $j\mapsto(1+I,J)$, but these latter two elements generate all of $R/I\times R/J$ as an $R$-module so the image must be the whole codomain.
Now let's work with ${\cal O}={\bf Z}[i]$, the ring of integers of ${\bf Q}(i)$, aka the Gaussian integers. Here you have found that $(2)=(1+i)(1-i)=(1+i)^2$ (since $1-i=-i(1+i)$ and $-i$ is a unit), that the ideal $(3)$ is prime, and that $(5)=(1+2i)(1-2i)$. Furthermore $(1+i)$ is obviously not coprime to itself, while $(1+2i),(1-2i)$ are coprime since $1=i(1+2i)+(1+i)(1-2i)$ is contained in $(1+2i)+(1-2i)$. Alternatively, $(1+2i)$ is prime and so is $(1-2i)$ but they are not equal so they are coprime. Anyway, you have
- ${\bf Z}[i]/(3)$ is a field and
- ${\bf Z}[i]/(5)\cong{\bf Z}[i]/(1+2i)\times{\bf Z}[i]/(1-2i)$ is a product of fields.
Go ahead and count the number of elements to see which fields they are. However, ${\bf Z}[i]/(2)={\bf Z}[i]/(1+i)^2$ is not a field or product of fields, although the fact that its characteristic is prime (two) may throw one off the chase. In ${\bf Z}[i]/(1+i)^2$, the element $1+i$ is nilpotent. Since this ring has order four, it is not difficult to check that it is isomorphic to ${\bf F}_2[\varepsilon]/(\varepsilon^2)$, which is not a product of fields since $\epsilon\leftrightarrow 1+i$ is nilpotent and products of fields contain no nonzero nilpotents.
Best Answer
Let $K$ be the field you want to construct and let $\Bbb Q(i)$ the field of complex numbers of the form $r+si$ with both $r$ and $s$ in $\Bbb Q$.
First thing you need to convince yourseld that $K\subset{\Bbb Q}(i)$. If you take a fraction $\frac{a+bi}{c+di}$ with $a,b,c,d\in\Bbb Z$ you can rewrite it as $$ \frac{a+bi}{c+di}=\frac{ac+bd}{c^2+d^2}+\frac{bc-ad}{c^2+d^2}i $$ (why?) and you're done.
On the other hand, if $\frac mn+\frac pqi\in\Bbb Q(i)$, we can rewrite this as $$ \frac{mq+npi}{nq} $$ where both numerator and denominator are Gaussian integers. Thus you also have $\Bbb Q(i)\subset K$ and you're finished.