Answer
$3(x-1)(x+2)$
Work Step by Step
$Factor$ $the$ $expression$ $completely:$
$(x-1)(x+2)^2$ - $(x-1)^2(x+2)$
Factor out $(x-1)(x+2)$ from both terms
$(x-1)(x+2)((x+2)-(x-1))$
Distribute the minus sign (-1) for $(x-1)$ in $((x+2)-(x-1))$ and simplify
=$(x-1)(x+2)((x+2)+(-x+1))$
=$(x-1)(x+2)(x+2-x+1)$
=$ (x-1)(x+2)(3)$
=$3(x-1)(x+2)$