ODE $y(1+2xy)dx+x(1-xy)dy=0$ 
$$y(1+2xy)dx+x(1-xy)dy=0$$

I have tried to isolate $\frac{dy}{dx}$ and got the following:
$$\frac{dy}{dx}=-\frac{y(1+2xy)}{x(1-xy)}$$
but I understand that the terms have to be in the same order and that is not the case. 
What should I do?

Set $u=xy$. Hence $\frac{du}{dx}=x\frac{dy}{dx}+y.$ Hence your equation became $$\frac{x}{u}\frac{du}{dx}-1 = \frac{1+2u}{u-1}.$$ This can be rewritten $$x\frac{du}{dx} = u\frac{3u}{u-1}$$ or else $$\frac{u-1}{3u^2}du=\frac{1}{x}dx.$$ Now you can integrate both sides.
