In the first picture, the eyes are at point B on the water surface. When you see the position of object A in A', you will feel that the position of the object is higher (shallower than it is, closer to the water surface).
In the second picture, the eyes are underwater B. When you see the position of object A in A', you will feel that the position of the object is higher (farther from the water than it is).