We want to find an integrating factor $\mu$ as a function of $xy$ such that $(\mu M)_y = (\mu N)_x$. Let $z = xy$. Thus, $\mu(xy) = \mu(z(x, y))$ Then $$\mu_x(xy) = \frac{\mathrm{d}\mu}{\mathrm{d}z} \frac{\partial z}{\partial x} = y\frac{\mathrm{d}\mu}{\mathrm{d}z} \qquad \text{ and } \qquad \mu_y(xy) = \frac{\mathrm{d}\mu}{\mathrm{d}z} \frac{\partial z}{\partial y} = x\frac{\mathrm{d}\mu}{\mathrm{d}z}$$ Therefore, \begin{align*}
(\mu M)_y = (\mu N)_x & \implies \mu M_y + xM\frac{\mathrm{d}\mu}{\mathrm{d}z} = \mu N_x + yN\frac{\mathrm{d}\mu}{\mathrm{d}z}\\
&\implies \mu(M_y - N_x) = \frac{\mathrm{d}\mu}{\mathrm{d}z}(yN - xM)\\
&\implies \frac{\mathrm{d}\mu}{\mathrm{d}z} = \mu\left(\frac{N_x - M_y}{xM - yN}\right)
\end{align*}
Therefore, $$\mu(z) = \exp\left(\int R(z)\,\mathrm{d}z\right) \qquad \text{ where } R(z) = R(xy) = \frac{N_x - M_y}{xM - yN}$$
Returning to our original differential equation, let $$M(x, y) = 3x + \frac{6}{y} \qquad \text{ and } \qquad N(x, y) = \frac{x^2}{y} + 3 \frac{y}{x} = 0$$ Then $$\frac{\partial}{\partial y}M(x, y) = \frac{-6}{y^2} \qquad \text{ and } \qquad \frac{\partial}{\partial x}N(x, y) = \frac{2x}{y} - \frac{3y}{x^2}$$ We can see that this equation is not exact, however, note that $$\frac{N_x - M_y}{xM - yN} = \frac{\frac{2x}{y} - \frac{3y}{x^2} + \frac{6}{y^2}}{x\left(3x + \frac{6}{y}\right) - y\left(\frac{x^2}{y} + 3 \frac{y}{x}\right)} = \frac{\frac{2x}{y} - \frac{3y}{x^2} + \frac{6}{y^2}}{2x^2 + \frac{6x}{y} - \frac{3y^2}{x}} = \frac{\frac{2x}{y} - \frac{3y}{x^2} + \frac{6}{y^2}}{xy\left(\frac{2x}{y} - \frac{3y}{x^2} + \frac{6}{y^2}\right)} = \frac{1}{xy}$$
Thus, we have an integrating factor $$\mu(xy) = \exp\left(\int \frac{1}{z}\,\mathrm{d}z\right) = e^{\log{|z|}} = z = xy$$
Multiplying the original differential equation through by our integrating factor, we have $$\left(3x^2y + 6x\right) + \left(x^3 + 3y^2\right)\frac{\mathrm{d}y}{\mathrm{d}x} = 0$$ We can see that this differential equation is exact because $$\frac{\partial}{\partial y}(3x^2y + 6x) = 3x^2 = \frac{\partial}{\partial x}(x^3 + 3y^2)$$ Thus, there exists a function $\psi(x, y)$ such that \begin{align*}\psi_x(x, y) &= 3x^2y + 6x \tag{1} \\\psi_y(x, y) &= x^3 + 3y^2 \tag{2}\end{align*}
Integrating (1) with respect to $x$, we get $$\psi(x, y) = x^3y + 3x^2 + h(y)$$ for some function $h$ of $y$. Next, differentiating with respect to $y$, and equating with (2), we get $$\psi_y(x, y) = x^3 + h'(y)$$
Therefore, $$h'(y) = 3y^2 \qquad \implies \qquad h(y) = y^3$$ and we have $$\psi(x, y) = x^3y + 3x^2 + y^3$$
Thus, the solutions of the differential equation are given implicitly by $$x^3y + 3x^2 + y^3 = C$$