The Red and Blue Goomba serves to the Goomba King in order to stop Mario and Goombario to go to Toad Town. They will appear at the end of the Goomba Road where both attack Mario and start a battle. After getting defeated, The Red and Blue Goomba will retreat in shame to the Goomba King's Fortress. Once Mario and Goombario are there, they will confront the Goomba King and The Red and Blue Goomba again.
It's recommended to hit the tree that holds a Goomnut with the hammer and use the Fire Flower to attack them and defeat the Red and Blue Goomba first to confront without problem the Goomba King. When all of them are finally defeated, they will retreat to the fortress but Mario can push a button that makes the fortress collapses, sending both Goomba King and the Red and Blue Goomba away to a mountain.
They are last seen in the credits along with the Goomba King who got stuck in a tree and both Red and Blue Goomba are trying to help him until he finally falls out and leaves along with the Red and Blue Goomba.
They are very similar to Angry Goomba and Sad Goomba from Super Princess Peach in terms of appearance.