There's a Koopa near the pipe that goes into the cave. Go through the pipe and you'll see purple brick blocks. There are many Koopas and Goombas here. There are some areas where you can send a shell ricocheting all over to hit blocks and enemies. Be sure not to get hit. Ahead are clouds that infinitely move up and down. The first Green Star is here. Take the clear pipe near the clock to reach the midpoint.
You'll see a Mystery Box nearby. It leads to a room where you have 10 seconds to kill 2 Koopas and collect the second Green Star. Leave the nearby crate intact, as it contains Microgoombas. Keep going and you'll see a long, triple item block. Hit it, then stand on it. Jump to find an invisible triple item block above it, and one more above that. These form stairs to a pipe which leads to the stamp. Drop down and you'll find the third Green Star with a stack of Goombas. Either attack them from below or ground pound them to get it. The pipe nearby leads to the flagpole.
The stamp is a Coin stamp.