Green's theorem says
[tex]\oint Pdx+ Qdy= \int\int \frac{\partial Q}{\partial x}- \frac{\partial P}{\partial y}dA[/tex]
It is not that the "order" has changed but that the "P" (which is multiplied by dx in the path integral) is differentiated with respect to y and the "Q" (which is multiplied by dy in the path integral) is differentiated with respect to x. And the reason for that is connected to the equality of "mixed" second partials.
IF "Pdx+ Qdy" is an "exact differential"- that is, if there exist a function F(x,y) such that dF= Pdx+ Qdy, then [itex]\int Pdx+ Qdy= \int dF= F[/itex] evaluated between the end points of the path. And, of course, if the path is closed, the endpoints are the same and F(p)- F(p)= 0. But if Pdx+ Qdy is an exact differential, then we have [itex]P= \partial F/partial x[/itex] and [itex]Q= \partial F/\partial y[/itex] so that [itex]\partial P/\partial y= \partial F^2/\partial x\partial y[/itex] and [itex]\partial Q/\partial x= \partial F/\partial y\partial x[/itex] so that [itex]\partial Q/\partial x- \partial P/\partial y[/itex] is the difference between the two "mixed" second derivatives- and, of course, as long as the derivatives are continuous, those mixed derivatives are equal and their difference is 0.
In essence, then, the two sides of
[tex]\oint Pdx+ Qdy= \int\int \frac{\partial Q}{\partial x}- \frac{\partial P}{\partial y}dA= \int\int \frac{\partial P}{\partial y}- \frac{\partial Q}{\partial x}dA[/tex]
measure how much Pdx+ Qdy "misses" being an exact differential.