What is pressure?
Pressure is the force divided by the area perpendicular to its application. The interesting thing about pressure is that, when everything is in equilibrium, it is equal in every direction.
The force in question here is the weight. For a given area on the ground, the weight of the atmospheric air column acting on this area will give us the atmospheric pressure. So when we say that the atmospheric pressure is 14,7 pounds per squared inch, that means that for every square of 1" X 1", the quantity of air over that surface weights 14,7 lb.
This is why when we go up in altitude, the pressure drops: the column of air over us is shorter.
At ground level, two side-by-side areas have the same air pressure acting on them, therefore there is equilibrium, the air does not displace sideways and pressure is equal in all directions.
Now if we replace some of that air with, say, water, the new weight will be the weight of the (now shorter) air column PLUS the weight of the water column. Just like the case for air only, if there is no displacement, this means that the pressure has to be equal in every directions at the bottom of the water column. This is why the pressure is equal in both of your example: if at one place there is a column of water of equal height (and the same weight of air over it), the pressure at the bottom will be the same in both cases. And because there is equilibrium, in a horizontal plane (same height), the pressure has to be the same everywhere in that plane.
By the way the proper equation is:
P = P_{o} + \rho gh
Where \rho gh is the pressure due to a column of a given height and density (a column of water for example) and P_{o} is the pressure acting over that column (the column of air over that column of water for example).