To rescue Mario, you need at least 8 Stars. Go into the castle version of the rec room, where Toad is worried about losing Peach's rec room keys. Open the 8 Star door. Go forward, jump across the platforms, climb the pole, and reach the top of the huge tree. Jump down the hole on top of it. To defeat the following Boss, Goomboss as Yoshi, just run behind him, swallow a minion, and throw it back at him. After each hit, he will grow and redden. After three hits, he will be defeated and you will get the key to Mario's room. Then, just unlock the door and go inside.