This is basically "Green's Theorem":

\(\displaystyle \oint_C Ldx+ M dy= \int_D\int \left(\frac{\partial M}{\partial x}+ \frac{\partial L}{\partial y}\right) dxdy\)

Where D is some region of the xy-plane and C is its boundary. In this case, since we are finding the area of D, which is \(\displaystyle \int_D\int 1 dxdy\), we can take M and N to be any functions of x and y such that \(\displaystyle \frac{\partial M}{\partial x}+ \frac{\partial L}{\partial y}= 1\).

One such would, of course, be L= 0 and M= x. That would give

\(\displaystyle \oint_C xdy= \int_D\int 1 dxdy\)

another would be L= y, M= 0. That would give

\(\displaystyle \oint_C y dx= \int_D\int 1 dxdy\)