Clearly $[\mathbb Q(i): \mathbb Q] = 2$. I wanted to prove that $X^2+2$ is irreducible over $\mathbb Q(i)$ in order to get the degree of the whole extension. My attempt:
Assume $X^2+2$ is reducible. Than there must be an $\alpha \in \mathbb Q(i)$ s.t. $a^2+2 =0 $ Write $\alpha = (p+qi)$ where $p,q \in \mathbb Q$. Then $$ p^2 + 2pqi -q^2 +2 = 0 $$ That means $pq=0$. If $p=0$ then $2=q^2$ so $\sqrt 2 \in \mathbb Q$. Contradiction. If $q=0$ then $p^2 = -2$ so $\sqrt{-2} \in \mathbb Q$. Contradiction. So $\alpha$ can not exist and hence $X^2+2$ is irr. over $\mathbb Q(i)$.
Is this correct ?
$\mathbb{Q}(i,\sqrt{-2})=\mathbb{Q}(i,\sqrt{2})$. Indeed $i$ belongs to both fields and $\sqrt{-2}=i\sqrt{2}\in\mathbb{Q}(i,\sqrt{2})$, while $\sqrt{2}=-i\sqrt{-2}\in\mathbb{Q}(i,\sqrt{-2})$ (I assume $\sqrt{-2}=i\sqrt{2}$, it would be the same with the other determination).
Since clearly $i\notin\mathbb{Q}(\sqrt{2})$, we have: $$ [\mathbb{Q}(\sqrt{2},i):\mathbb{Q}(\sqrt{2})]=2 $$ and we can use the following dimension formula: $$ [\mathbb{Q}(\sqrt{2},i):\mathbb{Q}] = [\mathbb{Q}(\sqrt{2},i):\mathbb{Q}(\sqrt{2})] [\mathbb{Q}(\sqrt{2}):\mathbb{Q}] =2\cdot2=4 $$