a: \(=\left(\dfrac{x}{y\left(x-y\right)}-\dfrac{2x-y}{x\left(x-y\right)}\right):\dfrac{x+y}{xy}\)
\(=\dfrac{x^2-2xy+y^2}{xy\left(x-y\right)}\cdot\dfrac{xy}{x+y}\)
\(=\dfrac{\left(x-y\right)^2}{\left(x-y\right)\left(x+y\right)}=\dfrac{x-y}{x+y}\)
b: \(=\dfrac{x^2+2xy+y^2-x^2+2xy-y^2+4y^2}{2\left(x-y\right)\left(x+y\right)}\cdot\dfrac{x-y}{2y}\)
\(=\dfrac{4xy+4y^2}{2\left(x+y\right)}\cdot\dfrac{1}{2y}=\dfrac{4y\left(x+y\right)}{4y\left(x+y\right)}=1\)