The sixth and seventh red coins are in the way. Now you have to jump onto another pole, except this time both the poles are moving, making it even more difficult.Keep holding onto that pole into the fifth red coin.If you fall, climb back up to where you were and try again. This is where it gets difficult, as you have to jump off your pole and land on the other one right next to it when it stops. Hold onto it until you get to the platform where the star will appear, at which point let go and grab onto the next pole in the same direction. Once you're on the first platform, grab onto the other pole.Wait until the pole comes over to you, then grab onto it and slide up and down it as necessary to grab the three coins. The next three coins are all to the left of you.
You have to hit the same switch as star 1, but climb the other steps.
Note: You have to defeat Bowser in the Fire Sea (30 stars and one from Dire, Dire Docks) for the poles to appear. Also, it can be cheated by simply playing as Mario and using the Flower Power to float up to the top. This was made much easier in the Nintendo DS version, as there is a platform for the poles that pass over coins 6 and 7, and you only need to use one pole to get to the blue coin block.