Use mario to flip to 3-D and use Boomer to destroy the cracks on the ground. Then flip back into 2-D when you fall in the hole, climb up the ladder, and use Thoreau to hit the switch. You must make the switch match the color of the background of the portrait you are under. The portrait on the very far right will not show a crack, but you can still break a hole under it. After you do that to all of them, a door will appear. Save (there is a save block under the red one on the far right), and go through the door and show him who's boss!