To add or subtract expressions, expand them to make their denominators the same. Least common multiple of $y\left(x-y\right)$ and $x\left(-x+y\right)$ is $xy\left(-x+y\right)$. Multiply $\frac{x}{y\left(x-y\right)}$ times $\frac{-x}{-x}$. Multiply $\frac{y}{x\left(-x+y\right)}$ times $\frac{y}{y}$.
Since $\frac{x\left(-1\right)x}{xy\left(-x+y\right)}$ and $\frac{yy}{xy\left(-x+y\right)}$ have the same denominator, add them by adding their numerators.