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.                

If $x-c$ is the common  factor,
$x-c$ will divide $(x^2+bx+a)-(x^2+ax+b)=(b-a)(x-1)\implies c=1$
If $x^2+bx+a=(x-1)(x-d),$
$\iff x^2+bx+a=x^2-x(d+1)+d$
Comparing the constants & the coefficients of $x,$
$ d=a,b=-(d+1)=-(a+1)$
