Jonah used a metaphor to compare the earth to a prison. Alternate translation: "the earth was like a prison that was about to lock me in forever" (See: [[rc://en/ta/man/translate/figs-metaphor]])
Jonah speaks of the place of the dead as if it were a pit. Alternate translation: "But you saved my life from the place of the dead" or "But you saved me from the place where the dead people are" (See: [[rc://en/ta/man/translate/figs-metaphor]])