This is a detailed plot of Mario and Sonic: Race Against Time.
Suddenly, there is an explosion and Bowser and Eggman appear from the debris. They steal hundreds of powerful artifacts (known as Time Bombs) and take all the guests, save for Mario and Sonic. Time Bombs, when detonated, will freeze that are in time.
Bowser and Eggman scatter their captives throughout Mobius and the Mushroom Kingdom. They also put a Time Bomb with them. They do this because freezing Mobius and the Mushroom Kingdom in time will reveal a legendary object called the Master Bomb inside a place called the Time Tomb. This they are told by an old legend.
Mario and Sonic go after Bowser and Eggman, but are separated by an invisible wall. Mario is stuck in Mobius, whilst Sonic is stranded in the Mushroom Kingdom. Thankfully, however, they can still talk to each other.
Mario eventually gains speed to rival Sonic and Sonic starts going through the Mushroom Kingdom as if he lived there. They rescue Luigi and Tails.
Whilst travelling through the first area of their worlds, Mario and Sonic are able to also rescue: Yoshi, Knuckles, Peach, Amy, Toad and Omochao. But they don't know about the Time Bombs and the first area freezes in time without them knowing.
In the second world they save: Daisy, Cream, Wario, Shadow, Waluigi and Rouge. Unfortunately, they are stopped by Metal Mario and a reprogrammed Omega. After defeating them, they convince them to come with them.
In the third world they free: Rosalina, Tikal, Donkey Kong, Jet, Diddy Kong, Storm, Toadsworth and Wave. Before leaving, they are ambushed by Orbot, Cubot and the Koopalings. After being defeated, Orbot, Cubot and the Koopalings join them.
In the fourth world they save: Boom Boom, Black Doom, Pom Pom, Metal Sonic, Birdo, Blaze, Toadette, Silver, Kamek, Mephiles, King Boo and Eggman Nega. Again, before leaving, they are cornered by Koopa Kid and the Deadly Six. They join them after being defeated.
In the fifth and final world they rescue no one. Instead they realize they are in a large void with a tomb in the center. Seeing Bowser and Eggman going towards the tomb, they give chase, but are stopped by an extremely large army of enemies. The team of characters finally defeat them and go into the tomb.
Bowser and Eggman have set the Mater Bomb, which will freeze the entire universe, to 1:00:00. Mario and Sonic engage in battle with Bowser and Eggman. Bowser uses a machine to transform himself into Giga Bowser, and Eggman uses a flying machine with a large laser cannon, rocket launchers on the wings and a turret that shoots powerful beams.
Sonic fights Giga Bowser, and at first it seems Giga Bowser will win. However, Sonic is able to trap him between a wall and a box. He grabs the machine Bowser used to turn into Giga Bowser, aims it at him, sets it to 'MINI' and fires. Bowser turns into a very small version of himself.
Mario fights Eggman. He is surprised at first but eventually gets used to the speed. Using the incredible speed he gained earlier, he dodges all the beams. Eggman starts using his rocket launchers. However, Mario, using a technique Sonic showed him, does a spinball and deflects the rockets back at Eggman. He also uses a Homing Attack when possible. In a last ditch effort, Eggman uses his laser cannon. Mario takes advantage of this and tricks Eggman into blowing up the Master Bomb. Mario uses a Homing attack on a confused Eggman, knocking him out.
With the Master Bomb destroyed, Mobius and the Mushroom Kingdom unfreeze. Luigi and Daisy continue their wedding.