\(\dfrac{x^2+xy}{\left(x+y\right)^2}=\dfrac{x\left(x+y\right)}{\left(x+y\right)^2}=\dfrac{x}{x+y}=\dfrac{x\left(x-y\right)}{\left(x+y\right)\left(x-y\right)}\)
\(\dfrac{y^2-xy}{\left(x-y\right)^2}=\dfrac{-y\left(x-y\right)}{\left(x-y\right)^2}=\dfrac{-y}{x-y}=\dfrac{-y\left(x+y\right)}{\left(x-y\right)\left(x+y\right)}\)
\(\dfrac{2xy}{x^2-y^2}=\dfrac{2xy}{\left(x-y\right)\left(x+y\right)}\)