\begin{gather*}
N_x = \frac{2x}{y} - \frac{3y}{x^2}, M_y = -\frac{6}{y^2}, xM = 3x^2 + \frac{6x}{y}, yN = x^2 + 3\frac{y^2}{x}, \\\frac{N_x - M_y}{xM - yN} = \frac{\frac{2x}{y} - \frac{3y}{x^2} + \frac{6}{y^2}}{2x^2 - \frac{3y^2}{x} + \frac{6x}{y}} = R = \frac{1}{xy}
\end{gather*}
From assignment
\begin{gather*}
\mu (z) = \exp(\int \frac{1}{z} d(z)) = z,\\
\mu M = 3x^2y + 6x, \mu N = x^3 + 3y^2,\\
\int \mu M dx = x^3y + 3x^2 + f(y) + c_0,\\
\int \mu N dy = x^3y + y^3 + g(x) + c_1.
\end{gather*}
Combine the previous two result gives
$$ \phi(x, y) = x^3y + 3x^2 + y^3 = c,$$
where
$\frac{\partial\phi}{\partial x} = uM, \frac{\partial\phi}{\partial x} = uN$ We do not need this