Consider $\left(x+y\right)\left(x-y\right)$. Multiplication can be transformed into difference of squares using the rule: $\left(a-b\right)\left(a+b\right)=a^{2}-b^{2}$.
$$x^{2}-y^{2}-\left(x-y\right)\left(x+y\right)$$
Consider $\left(x-y\right)\left(x+y\right)$. Multiplication can be transformed into difference of squares using the rule: $\left(a-b\right)\left(a+b\right)=a^{2}-b^{2}$.
$$x^{2}-y^{2}-\left(x^{2}-y^{2}\right)$$
To find the opposite of $x^{2}-y^{2}$, find the opposite of each term.