When Bilbo was talking with Frodo when he arrived at Rivendell, Bilbo said that he had wandered for a while. After he wandered for a while, He arrived at Rivendell and went to Dain with some dwarves. After Dain, he came back to Rivendell and stayed there. So my question is where did Bilbo wander before going to Rivendell?
Bilbo had not much to say of himself. When he had left Hobbiton he had wandered off aimlessly, along the Road or in the country on either side; but somehow he had steered all the time towards Rivendell. ~ Fellowship of the Ring, Book 2