a: \(=y\left(x-y\right)^2\)
b: \(=x^2\left(x-2\right)-\left(x-2\right)=\left(x-2\right)\left(x-1\right)\left(x+1\right)\)
\(a,=y\left(x^2-2xy+y^2\right)=y\left(x-y\right)^2\\ b,=x^2\left(x-2\right)-\left(x-2\right)=\left(x-2\right)\left(x^2-1\right)=\left(x-1\right)\left(x-2\right)\left(x+1\right)\)