These two metaphors mean the same thing. The writer's danger is spoken of as if it was a deadly pit full of mud. This emphasizes the danger. Alternate translation: "from being trapped in a horrible pit full of sticky mud" (See: [[rc://en/ta/man/jit/figs-parallelism]] and [[rc://en/ta/man/jit/figs-metaphor]])
Here "my feet" refers to the writer, and "a rock" refers a place of safety. Alternate translation: "he provided safety for me" (See: [[rc://en/ta/man/jit/figs-synecdoche]] and [[rc://en/ta/man/jit/figs-metonymy]])