Answer
See the proof below.
Work Step by Step
By doing the term-by-term multiplication and then canceling the terms, we get:
a) $(A-B)(A^2+AB+B^2)=A^3+A^2B+AB^2-BA^2-AB^2-B^3=A^3-B^3$
b) $(A+B)(A^2-AB+B^2)=A^3-A^2B+AB^2+BA^2-AB^2+B^3=A^3+B^3$
Thus, we proved what we had to in both cases by expanding the right-hand side as required.