.If A and B were at the same height
i.e. h=0 then P2 - P1=0 or P1 = P2
i.e., Pressure is same at all points inside a liquid lying on the same horizontal plane.
If g = 0 at place, then P2 = P1 at any two points inside the liquid (Pascal's law neglecting effect of gravity).