Problem: Which of the following rings is an integral domain.
Solution: We recall the following theorem.
In option $(A)$ the polynomial is $p(x) = x^2 + x + 1$, which is a quadratic polynomial and hence irreducibility is equivalent to have a root in $\mathbb{Z} $. Since $p(x)$ does not have a root in $\mathbb{Z} $ and hence it is irreducible. Therefore, $\mathbb{Z} [x]/\left\langle x^2 + x + 1 \right\rangle $ is an integral domain.
In option $(B)$ the situation is same as in option $(A)$ since the polynomial is quadratic. As the polynomial $x^2 - 2$ does not have a root in $\mathbb{Z} $, the ideal generated by it is a prime ideal and hence $\mathbb{Z} [x]/\left\langle x^2 - 2 \right\rangle $ is an integral domain.
In option $(C)$, the polynomial is $x^2 + 5x + 6 = (x+2)(x+3)$ which is reducible and hence the ideal is not a prime ideal and hence $\mathbb{Z} [x]/\left\langle x^2 + 5x + 6 \right\rangle $ is not an integral domain.
Finally, in option $(D)$ the polynomial $\left\langle x^7 + 1 \right\rangle $ is reducible as $-1$ is a root of $x^7 + 1$ and hence, the ideal generated by this polynomial is not a prime ideal and therefore, $\mathbb{Z} [x]/\left\langle x^7 +1 \right\rangle $ is not an integral domain.