а^2b + bc - c - ab^2 + ab - ac =( a^2b + ab ) + ( bc - ab^2) - (ac +c) =
= ab(a+1) - b(ab - c) - c(a+1) = (a+1) ( ab - c ) - b (ab - c) = ( ab - c)(a - b + 1 ).
а^2b + bc - c - ab^2 + ab - ac =( a^2b + ab ) + ( bc - ab^2) - (ac +c) =
= ab(a+1) - b(ab - c) - c(a+1) = (a+1) ( ab - c ) - b (ab - c) = ( ab - c)(a - b + 1 ).