\(\left(x-2y\right)\left(x^2+2xy+4y^2\right)-\left(x-y\right)\left(x^2+8y^2\right)\)
\(=x^3-8y^3-\left(x^3-x^2y+8xy^2-8y^3\right)\)
\(=x^3-8y^3-x^3+x^2y-8xy^2+8y^3\)
\(=x^2y-8xy^2\)
\(\left(x-2y\right)\left(x^2+2xy+4y^2\right)-\left(x-y\right)\left(x^2+8y^2\right)\\ =x^3-8y^3-\left(x^3+8y^3-x^2y-8y^3\right)\\ =x^3-8y^3-x^3-8y^3+x^2y+8y^3\\ =-8y^3+x^2y\)