Isn't $\mathbb Q[X]/(X^2+1)\cong \mathbb Q[i]$ wrong and should be $\mathbb Q[X]/(X^2+1)\cong \mathbb Q(i)$ ?
Indeed, $\mathbb Q[X]/(X^2+1)$ is a field whereas $\mathbb Q[i]$ is a ring (is the Fraction ring of $\mathbb Q(i)$).
Isn't $\mathbb Q[X]/(X^2+1)\cong \mathbb Q[i]$ wrong and should be $\mathbb Q[X]/(X^2+1)\cong \mathbb Q(i)$ ?
Indeed, $\mathbb Q[X]/(X^2+1)$ is a field whereas $\mathbb Q[i]$ is a ring (is the Fraction ring of $\mathbb Q(i)$).
If $\alpha$ is a root of a monic polynomial $\rm\:f(x)\:$ over a domain $\rm\:D\:$ then $\rm\:D[\alpha]\:$ is a field iff $\rm\:D\:$ is a field. Ditto for arbitrary integral extensions of domains. Here is a detailed treament of the quadratic case.
Addressing your question in the comments: observe that in $\;\Bbb F:=\Bbb Q[X]/\langle X^2+1\rangle\;$ , we have that if $\;x:=Z+\langle x^2+1\rangle\;$ , then $\;x^2+1=0\implies x^2=-1\;$ , so in $\;\Bbb F\;$ we get
$$\frac1{x+2}=\frac{2-x}{4-x^2}=\frac{2-x}{4+1}=\frac15(-x+2)$$
so
$$\frac{x+1}{x+2}=(x+1)\frac1{x+2}=(x+1)\frac15(-x+2)=\frac15(-x^2+x-2)=\frac15(x-1)$$
In similar form you can do other calculation. Observe the is just hte usual operations inthe complex $\;\Bbb C\;$ , just "in disguise".