>>987
a^2-3ab+2b^2-a+3b-2
=(a-b)(a-2b)-a+3b-2
=(a-b-2)(a-2b+1)