If you take the surface as the zero reference, you can consider negative numbers as numbers which represent distance underwater related to the surface and positive numbers as distance over the water.
In this case, 365 feet below the surface is -365.
When the diver swims upward 166 feet, the distance to the surface is:
365 - 166 = 199
Due to the distance is 199 feet below the surface, the number which represent this distance is -199