Sorry about that. About the flag at the end, it's just a check to note that you've completed the room, the flag turns from gray to purple/orange.
When you turn both the flags in both the world's, that's the end of it.
You can press R to switch the world based on red or black it will switch to orange or purple world with puzzles.
The snail race, yes, you just need to be fast with the WASD keys.