<s>[INST] Prove that $a+b+1 = 0$ The polynomials $x^2+ax+b$ and $x^2+bx+a$ have common factors.prove that $a+b+1=0$.
My attempt- I could do nothing other than dividing the polynomials to get  $x^2+bx+a$=$x^2+ax+b+bx-ax+a-b$.Please help me what to do.                
 [/INST] let $f(x)=x^2+ax+b$ and $g(x)=x^2+bx+a$. 
If the 2 polynomials have a common factor, then there exists an $x$ such that can write $$ f(x)=g(x)$$
Then we obtain, 
$ax+b=bx+a$,
which implies $x=1$ thereby $x-1$ is the common factor of the $2$ polynomials for all $a-b \neq 0$.
Since $x-1$ is a common factor of $f(x)$ and $g(x)$, then $f(1)=g(1)=0$. By replacing $x=1$ in both functions, the result is simply identical: $$ 1+b+a=1+a+b=0$$
</s>