Grand Duke Wilfred is the nephew to the King, and Bartholomew's opposite in every conceivable way. Okay, not every conceivable way. They both wear tights. But even a healthy love of bun-huggers doesn't change the fact that Wilfred is Bartholomew's foil.
The illustration accompanying paragraphs 79-81 is a good visual of how these two characters stack up to one another. Both wear hats and tights, and both boys are around the same height and, we assume, age. But despite such similarities, almost everything else about them contrasts. Bartholomew has light hair while Wilfred has black hair. Bartholomew has a simple feather adorning his cap, but Wilfred's hat has fanciful plumage topping it. Also, Bartholomew's innocent stare is mirrored by a haughty, upturned chin on Wilfred.
The opposition in their looks follows into the characters, and this is where their foiliness—hereby dubbed a real word for the moment—comes into play. Bartholomew obeys the King for a few reasons: it's expected of him, he doesn't want to get into further trouble, and it's his duty as a loyal subject.
Wilfred seems to be doing his royal duty, too. He tries to shoot the hat off Bartholomew's head and then suggests to the King to "'chop off his head'" (102). Both instances might suggest he's trying to solve the eternal-hat problem. Yet later on, when they go to toss Bartholomew off a turret, the King commands Wilfred to stop, but this happens:
"I won't wait," the Grand Duke talked back to the King. "I'm going to push him off now! That new big hat makes me madder than ever." (137)
It's the big reveal. While Wilfred seemed to be obeying the King's rules, he is really just trying to get what he wants. His "help" has more to do with the young Duke getting back at Bartholomew than helping the King get some respect.
And for that, he receives a spanking befitting a King—or a King's whipping boy, we guess.