Do whales in ocean use hyperbolic geometry to communicate? Since the speed of sound increases with depth in an ocean, the shortest time for the sound to travel between points $A$ and $B$ may be a curved path. But does sound actually take this curved path ? I mean if the whale at point $A$ makes a sound, intuition tells me it should go straight to point $B$(shortest distance.) Why would the sound go in a curve so that it reaches the point $B$ in shortest amount of time ? 

 A: Sound rays are refracted and reflected in non-homogeneous media the same as light rays. 
You can use the snell law to trace any ray path originating from $a$ (at any initial direction). For example, you can slice the ocean depth to many slices of depth $dy$ and calculate the outgoing angle as a function of incoming angle for each slice.
Eventually, only one ray from $a$ will arrive at $b$. This will be a curved ray, the curve as dictated by snell. It can be proven that this specific ray features the least time of travel when compared with "artificial" rays such as a straight line from $a$ to $b$.
A: There is more to it than just depth. Speed of sound depends on pressure, temperature, and to a small degree salinity. Salinity typically has a small effect in the ocean because it is pretty much constant. Sound travels faster at higher pressure and higher temperature. 
Consider sound traveling through water of uniform temperature parallel to the bottom. The deepest part of the wave gets ahead. This angles the wave upward. Near the surface, the ocean is warmer. The means sound near the surface gets angled down. The net effect is to create a sound channel at middle depth. 
Low frequency sound is absorbed very little in the ocean. It is absorbed when it hits something. But in the sound channel, it doesn't hit anything. It can travel across the entire ocean. 
This sound channel is used for acoustic thermometry. A transmitter on one side of the ocean emits a signal that is received on the other side. From the time it takes to cross the ocean, you can get a good average temperature of the water in between. With multiple receivers, you can get a good average of the entire ocean.  
http://atoc.ucsd.edu/
With enough paths through a body of water, you can do acoustic tomography. This is analogous to the X-ray tomography done to image the human body in a CAT scan. 
https://dosits.org/people-and-sound/research-ocean-physics/how-is-sound-used-to-measure-temperature-in-the-ocean/
