Jeeves and Wooster.
Mike and Psmith.
Wodehouse knew how to use foils in his work to get the maximum humorous results.
On the surface it seems like it's all about buffoonery placed against the wise-and-tolerant. After all, Wooster gets into one social scrape after another, right there along with his troublesome friends. Mike also stumbles through the world without a real direction until he meets up with Psmith.
But what makes Wodehouse's pairings so interesting is that the wise foils are just as messed up as the main buffoons. Sure, Jeeves is brilliant. He's also a gambler, obsessive about social standing, and doesn't always hit on the right scheme immediately. Plus, he stays with Wooster throughout all the problems that W and his buddies get into--even coming back from some hard-earned vacations in some cases!
Psmith? When Mike has a tough time adjusting to the new boarding school, Psmith is there to help. Having been likewise shoved into a new school, Psmith takes over the place. On the surface it seems like this kid has it way more together than Mike. Not so much. He's struggling just as much, and that's what makes the turn in Mike and Psmith so nice and still hilarious.
The best thing is that the foils are equal matches. Wooster is determined not to get it, but his intentions are always for the good. His sweetness makes up for his obtuseness. Jeeves balances the flaws in the main character by being a trifle shady (with the gambling) and by paying attention to the situation. Mike is openly not adjusting to the new school; Psmith is faking-it-til-he-makes-it.
That's how good foils work. One character doesn't really work without the other. Like peanut butter and jelly. In order to use foils you have to think about your main character: where are the weaknesses, strengths, foibles? How does the foil fill the gaps or create gaps of his own? They should balance each other and then tear through the story together.