Example 3. Solve the equation

$$
(x+y-2) d x+(x-y+4) d y=0
$$
Solution. Consider the system of linear algebraic equations

$$
\left\{\begin{array}{l}
x+y-2=0 \\
x-y+4=0
\end{array}\right.
$$

The determinant of this system is

$$
\Delta=\left|\begin{array}{rr}
1 & 1 \\
1 & -1
\end{array}\right|=-2 \neq 0
$$

The system has a unique solution $x_{0}=-1, y_{0}=3$. We make the substitution $x=\xi-1$, $y=\eta+3$. Then equation (5) will take the form

$$
(\xi+\eta) d \xi+(\xi-\eta) d \eta=0
$$

Equation (6) is a homogeneous equation. Setting $\eta=u \xi$, we get

$$
(\xi+\xi u) d \xi+(\xi-\xi u)(\xi d u+u d \xi)=0
$$

from which

$$
\left(1+2 u-u^{2}\right) d \xi+\xi(1-u) d u=0
$$

Separating variables, we have

$$
\frac{d \xi}{\xi}+\frac{1-u}{1+2 u-u^{2}} d u=0
$$

Integrating, we find

$$
\ln |\xi|+\frac{1}{2} \ln \left|1+2 u-u^{2}\right|=\ln C, \quad \text { or } \quad \xi^{2}\left(1+2 u-u^{2}\right)=C
$$

Returning to the variables $x, y$ :

$$
(x+1)^{2}\left[1+2 \frac{y-3}{x+1}-\frac{(y-3)^{2}}{(x+1)^{2}}\right]=C_{1}
$$

or

$$
x^{2}+2 x y-y^{2}-4 x+8 y=C\left(C=C_{1}+14\right)
$$