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 $p$ and $q$ are common factors of the polynomials, then $$p^2+pb+a=p^2+ap+b$$ and $$q^2+qb+a=q^2+aq+b$$ So, $(b-a)p=b-a$ and $(b-a)q=b-a$, this shows that $p=q=1$ Substituting $p=q=1$ in each of the two equations yeilds  $a+b+1=0$
