First,we define an operation on $\mathbb{Q}[x]/(x^{2}+2)$ as follows:
Let $f(x) \in\mathbb{Q}[x]$, By Euclidean Alogrithm, we have:
$f(x)=g(x)(x^2+2)+ax+b$
$\Rightarrow \overline{f(x)}=ax+b\in \mathbb{Q}[x]/(x^{2}+2)$
For $\overline{f(x)}=ax+b;\overline{g(x)}=cx+d$, $f,g \in\mathbb{Q}[x]/(x^{2}+2)$ ,we have:
$\overline{f(x)g(x)}=(ad+bc)x+bd-2ac$
With the operation defined as above,we contruct a ring homomorphism as follows
$\mathbb{Q}[x]/(x^2+2)\overset{\varphi }{\rightarrow} Im\varphi$
$\varphi(ax+b) \rightarrow ai\sqrt{2}+b$
It is easy to check that $\varphi$ is a ring homomorphism. Moreover, clearly $\varphi$ is an bijection.
Hence, $\varphi$ is a ring isomorphism and
$Im\varphi =\mathbb{Q}[\sqrt{-2}]=\mathbb{Q}[i\sqrt{2}]$
Therefore,we deduce $\mathbb{Q}[x]/(x^2+2)\cong \mathbb{Q}[i\sqrt{2}]$
Instead of doing as above, we can contruct a ring homomorphism
$\mathbb{Q}[x]\rightarrow \mathbb{Q}[i\sqrt{2}]$
$\varphi(f(x))\rightarrow f(i\sqrt{2})$
We claim that : $Ker\varphi=(x^2+2)$
Indeed, Let $f(x)∈\mathbb{Q}[x]$, By Euclidean Alogrithm, we have: $f(x)=g(x)(x^2+2)+ax+b$
So, $f(i\sqrt{2})=0$ is equivalent to that $ai\sqrt{2}+b=0$
which gives $a=b=0$.
Consequently,$f(x)=g(x)(x^2+2)\in(x^2+2)$ (Ideal generated by $x^2+2$).
So $Ker\varphi\subseteq (x^2+2)$ ($1$)
Conversely, if $f \in (x^2+2)$ then $f=(x^2+2)g(x)$ for $g(x)$ some polynomial.
Clearly, $\varphi(f)=0$ which implies $(x^2+2)\subseteq Ker\varphi$ ($2$)
Combining ($1$) and ($2$) we have $Ker\varphi= (x^2+2)$.
and $Im\varphi=\mathbb{Q}[i\sqrt{2}]$
By the first Isomorphism theorem, we deduce that :$\mathbb{Q}[x]/(x^2+2)\cong \mathbb{Q}[i\sqrt{2}]$.
By similar argument we can easily get $\mathbb{Q}[x]/(x^2+1)\cong \mathbb{Q}[i]$
It remains to show that $\mathbb{Q}[i\sqrt{2}]$ is not isomorphic $\mathbb{Q}[i]$
Because one has an element whose square is $-2$ but no element whose square is $-1$, while the other has an element whose square is $-1$ but no element whose square is $-2$.
I should have made it clearer here,
Assume a contradiction that $\mathbb{Q}[i\sqrt{2}]\cong\mathbb{Q}[i]$ then there exists an isomorphism $\psi$ from $\mathbb{Q}[i\sqrt{2}]\rightarrow\mathbb{Q}[i]$
We have $\psi(i\sqrt{2})=a+bi$ for some $a,b \in \mathbb{Q}$
On the other hand $-2=-2\psi(1)=\psi(-2)=\psi ((i\sqrt{2})(i\sqrt{2}))= \psi^2(i\sqrt{2})=(a+bi)^2$
So $-2=a^2-b^2+2abi$ which gives $a=0$ or $b=0$
If $a=0$ then $b^2=2$ has no rational solutions
If $b=0$ then $a^2=-2$ has no rational solutions
Consequently we get a contradiction.
So $\mathbb{Q}[x]/(x^2+2)\cong \mathbb{Q}[i\sqrt{2}] \ncong \mathbb{Q}[i] \cong \mathbb{Q}[x]/(x^2+1)$