A^2*b - a^2*c + b^2*c - a*b^2 + a*c^2 - b*c^2 =
= (a^2*b - b*c^2) + (a*c^2 - a^2*c) + (b^2*c - a*b^2) =
= b(a^2 - c^2) + ac(c-a) + b^2(c-a) = -b(c-a)(c+a) + (ac+b^2)(c-a) =
= (c - a)(b^2 + ac - bc - ab) = (c - a)(b(b - c) - a(b - c)) = (b - a)(b - c)(c - a)