"The Switch Glitch" is the fourteenth episode of Season 2.
After Timmy's parents break a promise and leave him with Vicky, only for her to torment him again, Timmy wishes that he was the babysitter and Vicky was the child in order to get revenge, but his harsh treatment of Vicky results in Cosmo and Wanda being transferred to Vicky, who uses them to get revenge on Timmy.
Waking up on a Saturday, Timmy gets excited at all the possibilities not having school on that day holds, mostly cartoons. Cosmo sees Vicky coming to the house, and Timmy's parents tell him that they are going to the "Annual Mother-Father No Kids Allowed Cook Out", and leaving him with Vicky. Timmy objects that he made a deal with his parents that he would not need a babysitter on the weekends, but his parents take the legal document and use it as a fish wrap. They rush out the door quickly as Timmy questions of the fairness of this.
Vicky piles a load of homework that she wants Timmy to do for her. When Timmy refuses, she pulls out a tape recorder and tricks Timmy into saying "I didn't cheat on my math test!" so she can use it as blackmail. She took Timmy's clothes away and left him in only his underwear and let a bunch of kids from the neighborhood laugh and take pictures of him. Angered, Timmy rushes to his room and wishes that Vicky was a five year old so that he could babysit her. Vicky regresses down to a five year old and does not remember what happened. Timmy explains to her that he is her ten year old babysitter, and that they were going to have a very fun day.... not. Timmy really wants to get payback on Vicky.
Being the babysitter now, Timmy forces Vicky to do things like mow the lawn with a plunger, yelling at her, and eventually starts taking on the characteristics of Vicky. Timmy blackmails 5-year-old Vicky using a tape recorder like she had done to him earlier, and tricks her into claiming she stole from her mother's purse. He offers to help Vicky water the garden, and then sprays her with a hose, leaving her shivering cold. After being scolded by Wanda, Timmy decides to go and apologize, but bad memories of Vicky resurface (including scenes from previous episodes, such as Dream Goat!), and he screams at her again and humiliates her, causing Vicky to start crying.
Timmy wonders out loud why he is not feeling any satisfaction from this, and Wanda scolds him by saying that he used their magic simply to make a five year old girl cry. Timmy is about to change Vicky back to normal, but is stopped by a fairy reassignment agent who poofs in and reassigns Cosmo and Wanda to Vicky. Because of the way Timmy treated her, little Vicky is now more miserable than he is, and Timmy is now the one who is the "mean babysitter". The reassignment worker refuses to listen to Timmy's pleas and poofs away, leaving Timmy at the mercy of Vicky and his former godparents. Vicky uses her magic to get revenge on Timmy and turns the Turner house into a giant playroom full of horrifying looking toys, with her as queen on a throne.
Timmy runs and hides in his room at first, attempting to write a message to himself in case he were to forget he had fairies, but Wanda interrupts him and transforms his etch-a-sketch into a bat, scaring him. Timmy fleas, and runs into a dragon-form Cosmo, who tries to breathe fire on Timmy. Eventually, Timmy flees back to the living room, where Vicky has turned it into a horrifying playroom, including a giant robot version of teenage Vicky. She captures Timmy and wishes him into a pig with acne. Unable to escape on his own or with the help of his fairies, Timmy yells to Cosmo and Wanda there has to be something to escape him from this because Vicky is going to kill him with a giant robot version of herself. Wanda then tells him Vicky can't do that as that is against Da Rules. Vicky hearing this stops the robot from trying to kill Timmy. Timmy points out to Vicky that whenever a kid gets godparents they get a rulebook and the kid must follow every rule in the book no matter what. Timmy then uses his knowledge of the rules to trick Vicky into saying "I am happy and don't need my godparents anymore" which relieves Cosmo and Wanda from their duty to grant her wishes and they are reassigned to Timmy, whom the reassignment worker assesses as obviously more miserable than anybody. The reassigning fairy tells Cosmo and Wanda to "make with the happy" before leaving.
As opposed to getting revenge on Vicky again as suggested by Cosmo, Timmy instead wishes up a carnival for her. She whines and tries to claim she is miserable again, despite being obviously happy, until Cosmo and Wanda poof her up some ice cream. They ask why Timmy did not use them for revenge on Vicky, and he explains that without Vicky he would have never been miserable enough to meet Cosmo and Wanda, and that he is going to wish her up the best day a five year old could ever ask for before turning her back to her normal age and removing her memories of all the events that happened today. Wanda then tells Timmy that two wrongs don't make a right (meaning that everything he put Vicky through made him just as horrible as her), but Cosmo jokingly says "Three rights make a left, and now, it's time for the show!" Wanda, tired of his lackluster rendition of "La Cucaracha", turns into a fire hose and blasts him again.