Find all the polynomials with real coefficients $P\left(x \right)$ such that $P\left(x^{2}+x+1 \right)$ divides $P\left(x^{3}-1 \right)$.

Correct option is (A).

See this.