a) \(\dfrac{2x^2-2xy}{x^2+x-xy-y}\) \(\left(x\ne y;x\ne-1\right)\)
\(=\dfrac{2x\left(x-y\right)}{x\left(x+1\right)-y\left(x+1\right)}\)
\(=\dfrac{2x\left(x-y\right)}{\left(x-y\right)\left(x+1\right)}\)
\(=\dfrac{2x}{x+1}\)
b) \(\dfrac{x^2+y^2-z^2+2xy}{x^2-y^2+z^2+2xz}\)
\(=\dfrac{\left(x^2+2xy+y^2\right)-z^2}{\left(x^2+2xz+z^2\right)-y^2}\)
\(=\dfrac{\left(x+y\right)^2-z^2}{\left(x+z\right)^2-y^2}\)
\(=\dfrac{\left(x+y+z\right)\left(x+y-z\right)}{\left(x-y+z\right)\left(x+y+z\right)}\)
\(=\dfrac{x+y-z}{x-y+z}\)