The given expression is
(a+b)(a^2-ab+b^2)
We would simplify by multiplying the terms in the first bracket by the terms in the second bracket. We have
a * a^2 + a * - ab + a * b^2 + b * a^2 + b * - ab + b * b^2
= a^3 - a^2b + ab^2 + a^2b - ab^2 + b^3
We would collect like terms. It becomes
a^3 - a^2b + a^2b + ab^2 - ab^2 + b^3
= a^3 + b^3