Can you show whether it is exact or not?
$\displaystyle M_y(x,y)=1$
$\displaystyle N_y(x,y)=6x$
Since these are not equal, the equation is not exact. So, what should we do to seek an integrating factor?
Just to be clear, the equation is actually:
$\displaystyle (x+y)dx+(3x^2-1)dy=0$
Correct?
What I would do first is solve the system:
$\displaystyle x+2y-1=0$
$\displaystyle 2x+y-5=0$
From which we obtain:
$\displaystyle (x,y)=(3,-1)$
And so let's let:
$\displaystyle x=u+3\implies dx=du$
$\displaystyle y=v-1\implies dy=dv$
And the ODE becomes:
$\displaystyle ((u+3)+2(v-1)-1)dx-(2(u+3)+(v-1)-5)dy=0$
$\displaystyle (u+2v)du-(2u+v)dv=0$
$\displaystyle \frac{dv}{du}=\frac{u+2v}{2u+v}=\frac{1+2\dfrac{v} {u}}{2+\dfrac{v}{u}}$
Now you have a first order homogeneous equation...can you proceed?