How to Get to World 7 in "New Super Mario Bros DS"by Shea Laverty ; Updated September 22, 2017
Unlocking each of the world shortcuts in "New Super Mario Bros. DS" requires performing a special task, and World 7 is no exception. For World 7, however, there are actually two shortcuts. The first is to find the hidden cannon in World 4, while the other requires you to face a considerable challenge in World 5. Once you've completed these challenges, more adventures awaits you on the courses of World 7.
World 4 Hidden Cannon
The hidden cannon to World 7 is found in World 4's Haunted House. Reaching the hidden alternate exit requires a Mini Mushroom to shrink your size and increase your jump height. Clear the first section of the house, heading all the way to the upper right and through the door. In the second section, there's a switch to the far left that produces red blocks when you jump on it. Jump to the nearby pipe but don't enter it: instead, jump as high as you can and wall jump up and all the way to the right. Wall jump along the narrow path above you and enter the door to get to the hidden exit with the red flag pole. The World 4 cannon should now be unlocked.
World 5 Castle Boss
World 7 can also be unlocked by defeating the boss in the World 5 castle while using a Mini Mushroom. This adds a level of challenge to the fight, since Mini Mario dies instantly if he's hit, and can only damage the boss with his Ground Pound attack. The boss in this castle is Petey Piranha, who jumps up high and attempts to crush you. Dodge his attack and wait for him to slip on the ice, then Ground Pound him while he's down. Repeat the pattern until Petey is defeated.