[tex]ax^2-b+2bx+a-2ax-bx^2=(ax^2-bx^2)+(2bx-2ax)+(a-b)=\\\\x^2(a-b)x^2-2x(a-b)+(a-b)=(a-b)(x^2-2x+1)=(a-b)(x-1)^2[/tex]