This is the question as I still don't have permission to post picture, but it is basically when P(x) = x^3+x^2+ax+1, when a is a rational number, P(X) is also rational number for every x that satisfy x^2+2x-2=0
Consider the integral expression in $x$ $$ P= x^3 + x^2 + ax +1 $$ where $a$ is a rational number. At $a=a_0$ the value of $P$ is a rational number for any $x$ which satisfies the equation $x^2 + 2x -2 = 0$, and n this case the value of $P$ is $P_0$.
Find the values of $a_0$ and $P_0$
Just another way without explicit root finding: $x^2=2-2x\implies x^3=2x-2x^2=2x-2(2-2x)=6x-4$, so in this case, $P(x)=(6x-4)+(2-2x)+ax+1=(a+4)x-1$.
As $x^2+2x-2$ has no rational roots ($\pm1,\pm2$ are not roots); to have $P$ rational, we must have $a_0=-4 \implies P_0=-1$