*sigh* i know i responded to similar questions here, but i can only find the ones with 3 variables, not two, so they might confuse you. i can't find a way to give you hints for this other than do the problem...or most of it anyway. other than that, i will tell you to go read your textbook. i know they gave an example of how to do this
we want to find a function so that and
(we know we can do this since the "equations" are exact: )
so take , then
(our constant of integration is a function of y, since this will die when we differentiate with respect to x)
But , so we have . hence
Therefore, is the (potential) function we seek