By law of refraction, we know that light bends away from the normal when it enters the air so pelican has to dive in front of the image of fish in horizontally.
When the light leaves the water from the fish it bends away from the normal which makes the fish appear to be nearer to the surface.