Answer:
x³ + x²y - 2xy² - xy + y²
Explanation:
Given
(x - y)(x² + 2xy - y)
Each term in the second factor is multiplied by each term in the first factor, that is
x(x² + 2xy - y) - y(x² + 2xy - y) ← distribute both parenthesis
= x³ + 2x²y - xy - x²y - 2xy² + y² ← collect like terms
= x³ + x²y - 2xy² - xy + y²