I would think that he's referring to the imprisonment of the dwarves. The dungeon of the elves is underground.
Chat with our AI personalities
The dwarves are Bilbo's friends for most of the Hobbit.
bury their parents alive
In the movie of The Fellowship of the Ring, Bilbo Baggins leaves Hobbiton to go north once more and visit his friends. He doesn't make it much farther than Rivendell where he settles for a time to write his books. In the book, he travels to Dale in the company of dwarves before returning to Rivendell.
Bilbo said, talking to himself, "what have i got in my pocket?" (it was the Ring). Gollum thought it was a riddle and Bilbo decided to make it one. he gave Gollum three chances to guess and gollum lost after four. then gollum went "to get something" (it was the ring), and Bilbo thought he was abandoned and left with the ring on. Gollum thought Bilbo knew the way out and he wanted to follow him, realizing Bilbo had the ring. Bilbo saw Gollum racing towards the gate and followed him to safety.
Bilbo Baggins is loyal because when the dwarves were captured by the goblins he went back into the horrible, horrible tunnels and look for his friends. He had just made up his mind that it was his duty, and that he must turn back.