\(=a^2b+ab^2-b^2c-bc^2-ac^2+a^2c\)
\(=a^2\left(b+c\right)+a\left(b-c\right)\left(b+c\right)-bc\left(b+c\right)\)
\(=\left(b+c\right)\left(a^2+ab-ac-bc\right)\)
\(=\left(b+c\right)\left[a\left(a+b\right)-c\left(a+b\right)\right]\)
\(=\left(b+c\right)\left(a+b\right)\left(a-c\right)\)