Instructions
Ride the fourth giant gear to its highest point, then jump to grab the first Star Coin. You can also ride the third gear up to a high platform above the fourth.
Let the giant Thwomp break through the bricks below him, then drop down to the newly opened space and grab the second Star Coin. Make sure to duck as soon as you get down there so the Thwomp doesn't hit you when he falls.
Ride the last giant gear all the way around, past the red platform to its right. Drop down onto the green pipe poking out of the lava there. In the secret room, hit the P Switch to change the coins floating over the lava into blocks. Quickly run across them and wall-jump up to the last Star Coin.