a^2+2ab+2ac-2bc-3b^2
=a^2-2ab+b^2+2ac-2bc-4b^2+4ab
=(a-b)^2+2c(a-b)+4b(a-b)
=(a-b)(a-b+2c+4b)
==(a-b)(a+3b+2c)