Jim.
Started 8 feet below the surface.
Use negative 8 (-8) to represent Jim's start, since he started below the surface.
Then add when he roses and subtract when he descends:
-8+(-18)+7+(-12)
-8-18+7-12 = -31
Carla
0-17+7-18 = -28
Jim rested at a greater depth
Jim rested at 31 feet below the surface while Carla rested at 28
Therefore Jim rested at a greater depth.