After defeating Smaug, you will be in Erebor. Once you solve the block riddle, Bombur will want you to find a belt. Next to Thorin are wooden platforms. Climb them and get the belt. Then in the gear room, climb up the wooden platforms in the back of the room and put it in the gears.