In chapters 7-9 Describe how Bilbo's plan to escape by defining which parts depend on luck and which on Bilbo's intelligence.
One of the many difficulties that Thorin's company find themselves in is that King Thranduil of the Woodelves locks the dwarves in his dungeon after he catches them wandering through Mirkwood forest. Bilbo, however, is not caught by the elvenking's guards because he slyly slips on his magic ring of invisibility and remains undetected. He follows the group into Thranduil's mountain-side palace and later locates the dwarves locked into cells deep in Thranduil's dungeons. At this point in the adventure, Bilbo demonstrates both luck and resourcefulness; his cleverly constructs a plan for the dwarves' stealthy escape, but he also has his fair share of luck when the guards drink too much wine and fall asleep, thus allowing Bilbo to steal their set of keys!
This is a moment in the adventure when Bilbo really starts to come into his own. He single-handedly defeated the over-sized spiders in Mirkwood, he hatches an elaborate and effective escape plan entirely on his own, and he oversees the plan to fruition and success, ultimately saving the entire quest! Through these deeds, Bilbo transitions from his earlier needy, helpless role to a much bolder, adventurous hobbit in charge of his own destiny.