Stoke's theorem clearly does not apply here. Green's theorem does but is far more general than needed here. As Dick said, your answer will depend upon the course, but the simplest thing to do is show that (y2 + 2xy)y= 2y+ 2x= (x2 + 2xy)x and so this is, as Dick said, a "total derivative" (I would say an "exact differential"): there exist a function F(x,y) having this as its differential. The integral along any curve is just the difference of F evaluated at the two endpoints.