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.
This follows from Zariski's lemma, and from the fact that $\mathbf C$ is algebraically closed.
Edit: Since your edit, I see that the intended solution was most likely the one provided by Sammy, below. Nevertheless, I think that this proof is the "correct" proof, because it is "independent of coordinates".
Best Answer
In (a), consider the ideal $(3, x^2 + 1)$ in $\mathbb{Z}[x]$. The quotient ring $$\frac{\mathbb{Z}[x]}{(3,x^2 + 1)} \simeq \frac{\mathbb{F_3}[x]}{(x^2 + 1)}$$ Since $x^2 + 1$ is irreducible over $\mathbb{F}_3$, the quotient ring is a field. Every element of $\mathbb{F}_3[x]/(x^2 + 1)$ has a unique representative of the form $a + bx$ where $a,b\in \mathbb{F}_3$. It follows that this field has nine elements.
As for (b), there is no such quotient. Otherwise, let $K$ be the quotient. Composing the canonical projection map $\mathbb{Q}[x] \to K$ with the inclusion map $\mathbb{Q}\to \mathbb{Q}[x]$, we obtain a nontrivial ring homomorphism $\phi:\mathbb{Q} \to K$. If $\phi(q) = 0$ for some nonzero $q\in \mathbb{Q}$, then $1 = \phi(1) = \phi(q)\phi(q^{-1}) = 0$, a contradiction. Hence $\phi$ is injective. It follows from the first isomorphism theorem that $K$ contains a subring isomorphic to $\mathbb{Q}$, contradicting the fact that $K$ is finite.