Beat the world 2 and 5 castle has small Mario.
When mario goes to the next screen he will drop down and youll go to level 4
Level - World 2 Castle
Enemy Name - Mummy Pokey
Tactic - the enemy is a snake you have to jump on his head 3 times has small mario.
Level - World 5 Castle
Enemy Name - Petey Piranha
Tactic - Defeat the World 5 boss--a giant flying piranha plant--as Mini Mario. After you've grabbed the key, Mini Mario will continue on to World-7. Alternatively, you can complete the World 4-Ghost House via an alternate route to unlock a cannon that launches Mario to World 7. For more information on completing the stage with this alternate route, consult the World 4 walkthrough.
(I copied text from IGN cus i didnt genuinely beat this guy I use cheats to become constant star mario and defeated him without dying)