Rewrite your differential as

Multiplying by the integrating factor

The last equation is exact. Its solution of the form where :

... (1)

... (2)

I think you integrate (1) with respect to x. This is too complicated .

Try to integrate (2) with respect to y and put p(x) as the constant of integration.