Separating the variables, the given equation can be written as:
\[ x^2(1-y)dy + y^2(1+x)dx = 0 \]
\[ \frac{1-y}{y^2} dy + \frac{1+x}{x^2} dx = 0 \]
\[ \therefore \left( \frac{1}{y^2} - \frac{1}{y} \right) dy + \left( \frac{1}{x^2} + \frac{1}{x} \right) dx = 0 \]
\[ \mathbf{y^{-2}} dy - \frac{1}{y} dy + x^{-2} dx + \mathbf{\frac{1}{x}} dx = 0 \]
Integrating we get,
\[ \int y^{-2}dy - \int \frac{1}{y}dy + \int x^{-2}dx + \int \frac{1}{x}dx = 0 \]
\[ \therefore \frac{y^{-1}}{-1} - \mathbf{\log y} + \frac{x^{-1}}{-1} + \mathbf{\log x} = c \]
\[ -\frac{1}{y} - \frac{1}{x} + \log x - \log y = c \]
\[ \log x - \log y = \mathbf{\frac{1}{x} + \frac{1}{y}} + c \]
is the required solution.