Complex sentence: He then took pity on Gollum, and spared his life (just as Bilbo had done in "The Hobbit"), instead binding him to a promise to guide them through the Dead Marshes to the Black Gate, which Gollum did.
Split into simpler sentences: He then took pity on Gollum, and spared his life (just as Bilbo had once done), instead binding him to a promise to help the hobbits. Frodo demanded he guide them through the Dead Marshes to the Black Gate, which Gollum did.