a^3-3a+2=(a-1)^3+3a^2-3a+1-3a+2=(a-1)^3+3a^2-6a+3=(a-1)^3+3(a^2-2a+1)=(a-1)^3+3(a-1)^2=(a-1)^2(a-1+3)=(a-1)^2(a+2)
a^3-3a+2=(a-1)^3+3a^2-3a+1-3a+2=(a-1)^3+3a^2-6a+3=(a-1)^3+3(a^2-2a+1)=(a-1)^3+3(a-1)^2=(a-1)^2(a-1+3)=(a-1)^2(a+2)
(а-1)(а²+а+1)-3(а-1)=
(а-1)(а²+а+1-3)=
(а-1)(а²+а-2)