Sometimes it might seem as though every single one of the characters in The Phantom Tollbooth is smart. They're able to approach the world in different ways than we do, and they can manipulate language and ideas to get out of dicey situations, or come up with delicious desserts (you know, whatever's required). The longer Milo stays in the Lands Beyond, the more cleverness he picks up, and by the time he visits the Mathemagician, he's ready to deploy a logic bomb he's spent chapter after chapter secretly getting ready. It seems that traveling to the Lands Beyond has unlocked Milo's smartness chip, and he gets to show us all just what he's learned.
Milo proves his worthiness as a candidate to rescue Rhyme and Reason when he convinces King Azaz and the Mathemagician to agree.
Milo is a great example of a hero because he tries things out. He's smart, but he's not afraid to admit when he doesn't know the answer to something.