Take one side at a time.

Let #f(x, y) = e^(x^2y)#.

#[(df)/(dx)]_"left" = (e^(x^2y))[x^2(dy)/(dx)+y*2x]#

(chain rule, product rule)

#[(df)/(dx)]_"right" = 2 + 2*(dy)/(dx)#

(chain rule with #(dy)/(dx)#)

Now, set them equal...

#(e^(x^2y))[x^2(dy)/(dx)+y*2x] = 2 + 2(dy)/(dx)#

...Multiply through.

#x^2e^(x^2y)(dy)/(dx) + 2xye^(x^2y) = 2 + 2(dy)/(dx)#

You can now isolate #(dy)/(dx)#. Move everything related to each other to each side.

#2xye^(x^2y) - 2 = 2(dy)/(dx) - x^2e^(x^2y)(dy)/(dx)#

Factor out common terms:

#2xye^(x^2y) - 2 = (dy)/(dx)[2 - x^2e^(x^2y)]#

Divide bracketed stuff over:

#[2xye^(x^2y) - 2]/[2 - x^2e^(x^2y)] = (dy)/(dx)#

...And simplify so it looks nicer.

#-[2 - 2xye^(x^2y)]/[2 - x^2e^(x^2y)] = (dy)/(dx)#

Wolfram Alpha lists the answer as:

#[2 - 2xye^(x^2y)]/[x^2e^(x^2y) - 2] = (dy)/(dx)#