Instructions
World 5 Castle
Grab the mini-mushroom from the power-up block just past the halfway point in the level.
Move right to find the large red doors that lead to the boss fight.
Defeat Petey Piranha as mini Mario to open the path to World 7. Dodge this plant as he tries to bomb you. This makes him dizzy, and you can jump on him and use the ground-pound technique to damage him. Repeat the process two more times to beat the World 5 boss and advance.
World 4 Ghost House
Hit a red switch just past the second star coin. This will make some blocks appear; use the wall jump technique on them to reach a platform above.
Transform into Mini Mario with a mini-mushroom from your collection (you cannot acquire one in this level).
Use the wall jump maneuver to scale the nearby pipe and reach a secret door above. Enter the door to access a warp cannon that will shoot you to World 7.