x^4-2ax^2+x+a^2-a
=x^4-ax^2+x-ax^2+a^2-a
=x^4-ax^2+x-ax+ax-ax^2+a^2-a
=x^4-ax^2+x-ax+a(a-x^2+x-1)
=x^4-ax^2+x^3-x^3+x^2-x^2+x-ax+a(a-x^2+x-1)
=-x^2(a-x^2+x-1)-x(a-x^2+x-1)+a(a-x^2+x-1)
=(a-x^2-x)(a-x^2+x-1)
x^4-2ax^2+x+a^2-a
=x^4-ax^2+x-ax^2+a^2-a
=x^4-ax^2+x-ax+ax-ax^2+a^2-a
=x^4-ax^2+x-ax+a(a-x^2+x-1)
=x^4-ax^2+x^3-x^3+x^2-x^2+x-ax+a(a-x^2+x-1)
=-x^2(a-x^2+x-1)-x(a-x^2+x-1)+a(a-x^2+x-1)
=(a-x^2-x)(a-x^2+x-1)