\(\begin{array}{l}a)\,x\left( {x - y} \right) + y\left( {x - y} \right)\\ =x.x+x.(-y)+y.x+y.(-y)\\= x^2 - x.y + x.y - y^2\\ = {x^2} + \left( {xy - xy} \right) - {y^2} = {x^2} - {y^2}\end{array}\)
\(\begin{array}{l}b)\,{x^{n - 1}}\left( {x + y} \right) - y\left( {{x^{n - 1}} + {y^{n - 1}}} \right)\\ = {x^{n - 1}}.x + {x^{n - 1}}.y +(- y).{x^{n - 1}}+( - y).{y^{n - 1}}\\ = {x^n} + \left( {{x^{n - 1}}.y - {x^{n - 1}}.y} \right) - {y^n} \\= {x^n} - {y^n}\end{array}\)
Chú ý: \({x^{n - 1}}.x = {x^{n - 1}}.{x^1} = {x^{n - 1 + 1}} = {x^n}\)