ab(a+b) - bc(b + c) + ac(a - c)
=a2b + ab2 - b2c - bc2 + a2c - ac2
=(ab2 - b2c) + (a2c - ac2) + (a2b - bc2)
=b2(a - c) + ac(a - c) + b(a2 - c2)
=b2(a - c) + ac(a - c) + b(a - c)(a + c)
=(a - c )[b2 + ac + b(a + c)]
=(a - c)[(b2 + bc) + (ab + ac)]
=(a - c)[b(b + c) + a(b + c)]
=(a - c)(a + b)(b + c)