$x^2y = 1 + cx$ → equation (1)

$x^2~dy + 2xy~dx = c~dx$

Divide by dx

$c = x^2~y' + 2xy$

Substitute c to equation (1)

$x^2y = 1 + (x^2~y' + 2xy)x$

$x^2y = 1 + x^3~y' + 2x^2y$

$1 + x^3~y' + x^2y = 0$

Multiply by dx

$dx + x^3~dy + x^2y~dx = 0$

$(1 + x^2y)~dx + x^3~dy = 0$ *answer*