After telling his story and apologizing for his trickery, he said he would try to help them anyway. With a bit of goodhearted manipulation, he gave the Scarecrow, Tin Woodman, and Lion what they wanted, noting that each had displayed what they thought they lacked on the journey. His plan for Dorothy was to fly away over the desert borders of Oz in his balloon. He planned on going as well, but just as they were about to depart, Toto distracted Dorothy and she missed the balloon. It sailed away in the sky and she cried out in sadness.
She tried to ask the Winged Monkeys in her second command to take her to Kansas, but they said they could not travel beyond the borders of Oz. A soldier in the Emerald City suggested she travel to the home of the Good Witch of the South, Glinda. This seemed a valid plan and Dorothy set out once more, accompanied by her friends. Together they faced more curious and dangerous creatures - people made of china, the devious Hammer-Heads, and the beasts of the forest who later crowned the Lion as their king.
Their journey was not easy but they finally made it to the lovely Glinda's castle. She said she did not need to help Dorothy because the girl's silver shoes possessed that power: she merely had to click her heels together three times and say where she wanted to go and she would be there. In exchange for her help, Dorothy gave her the Golden Cap, and she used the three commands to send the Scarecrow back to rule over the Emerald City, the Tin Woodman to rule over the Winkies, and the Lion to rule over the beasts in the forest. She then gave the Cap to the Monkeys and set them free from their bondage.
Dorothy kissed her friends goodbye and wished them well, and then clicked her heels together and said "Take me home to Aunt Em!" She ended up in the Kansas prairie, the silver shoes having fallen off in the desert. She ran towards her Aunt Em who was astonished to see her and asked her where she had been. Dorothy replied she had been in Oz and was glad to be home.