Behind the star gate in the basement. This star gate requires at least 30 stars to open.
ONE
Swim pass the underwater tunnel to the other side, find and press the ! switch. Then jumps onto the blocks appear to the top of the Bowser's submarine to get a star.
TWO
Open the 4 underwater chests surrounding the whirlpool in sequence. Take care when opening the last one as the current is pulling Mario into the whirlpool.
Collect 8 red coins. It is essential to finish Bowser in the Fire Sea to collect these 8 red coins. Swim pass the underwater tunnel to the other side, press the ! switch and climb up blocks appeared. Jump from moving post to moving post to collect all 8 red coins.
Swim passes the underwater tunnel to the other side. Notice there are bubbles and rings coming up from it. A star will appear when Mario swim passes 5 rings. It is easy to do so by swimming from water surface down to it. Then use the green ! switch to turn Mario into Metal Mario and collect the star.
FIVE
There is a manta swimming in the whirlpool area. When Mario swim through 5 consecutive rings coming out from its tail, a star will appear.
SIX
Swim pass the underwater tunnel to the other side, hit the blue ! box, turn Mario transparent and swim into a cage underwater where there is a star.
Max number of coins = 106
Mario will see the blue block when collecting 8 red coins for star 3.