By the scheme, we can see that ##B_y## is the y-component of magnetic field at location ##x+dx## (along the segment QR), and ##B'_y## is the y-component of magnetic field at location ## x## (along the segement PS) (I consider the point ##P## has coordinates ##(x,y)##). The definition of the partial derivative of ##B_y## with respect to ##x## is (for infinitesimal ##dx##)
$$\frac{\partial B_y}{\partial x}=\frac{B_y(x+dx)-B_y(x)}{dx}=\frac{B_y-B'_y}{dx}$$
from which it follows that $$B_y-B'_y=\frac{\partial B_y}{\partial x}dx$$.
The minus sign is there because we do the convention to consider the positive direction of walking through the loop, the counter clockwise direction. So we take as positive the ##B_x(y)dx ## and negative the ##B_x(y+dy)dx##, so the contribution will be ##(B_x(y)-B_x(y+dy))dx## and by similar reasoning as that in the previous paragraph (with the roles of x and y swapped) we can see that ##(B_x(y)-B_x(y+dy))=-\frac{\partial B_x}{\partial y} dy##