Sidetracked

Is this an International team-up? Oh, you must hate that Perry the Platypus, a loner like you.

Agent P teams up with a former partner, a human agent named Lyla, to stop a hijacked train running along the US/Canadian border. In a past mission, they had a falling out, so Agent P must decide whether or not he can trust Lyla and her unique sense of logic to get them through the mission, defeat Doofenshmirtz and save the train's passengers and Canada's national treasure - a moose named Albert.

Episode Summary
In downtown Seattle, three criminals steal parts from a warehouse and leave in a donut truck. Perry immediately starts following them on a platy-cycle, dodging attempts to knock him off their tail. Shortly after the chase crosses the Canadian border, Perry is able to hook the truck with his grappling hook, but C.O.W.C.A. agent Lyla Lolliberry takes over the chase, as Perry does not have jurisdiction in Canada. Lyla climbs onto the truck but accidentally detaches the metal arm the hook is attached to, allowing the criminals to escape. Perry attempts to continue the chase, but Major Monogram and Carl immediately call him back to headquarters. Perry leaves as Lyla apologizes.

Two months later, it's another normal day: Phineas and Ferb wake up; Candace makes a deal with Linda to clean the bathroom if she fails to bust the boys that day; and Buford, and Baljeet, and Isabella arrive to assist with the day's project. After walking past all of them, Perry enters his lair through a tree, accidentally crushing a car in the process, and receives his assignment: he must protect Albert the Moose, Canada's national symbol, in order to preserve the upcoming Canada Day ceremonies. However, Albert is riding a train on the U.S.-Canada border, and Perry only has jurisdiction on one side of the train, so Perry will be teaming up with Lyla again. Monogram trusts that Perry will be a professional despite his bad blood with her after the failed Seattle assignment, and wishes him luck.

Perry and Lyla arrive at the train at the same time, and they drop into a fine dining car, sharing a booth with Dr. Doofenshmirtz. Doofenshmirtz points out that they are currently trapped by societal convention - you can't make a scene in a fine dining establishment - and that he's participating in a U.S.-Canada evil exchange program, where he and a Canadian villain will trade evil schemes for a day. Doofenshmirtz promptly reveals his scheme: he has tied up the conductor and hijacked the train using his remote control Train Operator-inator, where he will hand over Albert to his exchange partner, ruining the Canada Day celebration. Lyla figures out that the exchange partner is her arch-nemesis, Professor Bannister, and Doofenshmirtz confirms this. However, Lyla has been trying to eat Doofenshmirtz's fries throughout their conversation, and he expresses how much this annoys him. Lyla gives Perry a wink, and they both begin messing with the fries, causing Doofenshmirtz to make a loud scene, disrupting the fine dining atmosphere.

Recognizing that his social convention trap has been foiled, Doofenshmirtz flees to the next car, but trips over the tied-up conductor. After a brief struggle, Perry ends up with the Train Operator-inator, but Lyla tries to take it from him and they both lose their grip, unintentionally returning it to Doofenshmirtz. They end up fighting again, but they somehow end up brawling with the conductor instead, and Doofenshmirtz escapes through the train's bathroom window, climbing onto the roof. Lyla and Perry follow him, but Lyla falls off after the train hits a bend in the track; Perry tries to pull her back off, but falls off too.

Lyla immediately notices a handcar next to the track, but Perry tries to operate it himself, slowing them down. Lyla teaches Perry how to operate it, and as they travel down the tracks, she metaphorically equates the handcar to teamwork: she and Perry have to work together to stop Doofenshmirtz.

After Doofenshmirtz boots a passenger off at his station (without stopping), another commuter notices Perry and Lyla operating the handcar on the adjacent track, and everyone starts taking video of it. Doofenshmirtz's cell phone alerts him to the trending video, and he starts watching it just as Perry kicks him in the face. Doofenshmirtz uses an installed platform to rise to the roof again, and while gloating to the two agents about how he cannot be stopped as long as he has the -inator, a tunnel entrance smashes the remote in his outraised hand. This causes the train to go completely out of control.

Back in Danville, Phineas wonders where Perry is.

On the now-runaway train, Lyla immediately realizes there's an emergency break in the engine car, and Doofenshmirtz decides to join the two agents in their attempt to stop the train. While running to the engine car, Doofenshmirtz, after dodging three obstacles because he had to tie his shoes, falls into the toilet he'd escaped through earlier, so Lyla and Perry go ahead without him. They reach the engine car, but Lyla is only able to fix the hazard lights, the emergency brake being inoperational. Perry realizes they can save everyone by getting them all into the caboose, where Albert is, so Lyla uses the PA system to tell the passengers to gather in that car. She, Perry, and Doofenshmirtz join the passengers in the caboose, which slows down; Perry had separated that car on the way there. Everyone rejoices that they're saved, but a large claw grabs the caboose and lifts it into the air.

Lyla sees that it's Bannister in a helicopter who's grabbed the caboose, so she and Perry grapple their way into the chopper, Doofenshmirtz climbing up behind them. Bannister remarks that they're now trapped in the helicopter. Doofenshmirtz realizes that Bannister must have finished his scheme early, and Bannister remarks that it was easy; he had to flip one switch on Doof's -inator. Bannister now revels in the fact that he has Albert the Moose in his custody, and Lyla calls him out for not being a true Canadian. Bannister reveals that he's not actually Canadian: he's from Greenland. His goal is to remedy the lack of Greenlandic national pride by causing Canadians to forget their national identity, allowing him to annex Canada for Greenland and institute his own pride-producing changes to his homeland, such as a new national anthem. Doofenshmirtz argues that Bannister's plan is far too complex to actually work, but Bannister begins apparently arguing with his shoulders. Upon seeing Lyla's confusion, he reveals two magnetic Bannister robots, built using the stolen parts from the Seattle job, whose culprits are playing cards in the helicopter. Lyla reveals that she intentionally let them escape, knowing they'd lead her to Bannister.

During the ensuing Helicopter Fight, Perry and Lyla trick the robots into magnetically attracting each other through the chopper roof, defeating them. Bannister, realizing he's lost, throws his Greenland flag on the two agents and parachutes away, but is immediately captured by Peter the Panda in an O.W.C.A. plane; Perry had texted Monogram during the fight, and Monogram sent Peter over. The villains defeated, Lyla brings the caboose-carrying chopper to the Canada Day celebration.

At the celebration, the Canadians celebrate their country (and Albert), the villains are all arrested, and Lyla explains that she had a tracker on Bannister's goons' donut truck. Monogram and Carl arrive to congratulate Lyla and Perry, and Doofenshmirtz suggest they visit Niagara falls, which the five of them (and Peter) do. As they all leave, Doofenshmirtz ponders how his scheme - the Cloud Magnetiz-inator - turned out.

Back home, Candace runs to get Linda; Phineas wonders how a cloud could have carried away their metal superstructure; and Linda, upon seeing nothing there, hands Candace a toilet brush. Perry walks up to his owners, who greet him, remarking, "A platypus's life is a life of leisure."

Songs

 * My Undead Mummy (instrumental)
 * We're On a Handcar
 * Greenland National Anthem
 * Helicopter Fight

End Credits
A scene in which Monogram informs the viewers that the show did not mean to make fun of Greenland.

I know what we're gonna do today
None.

Perry's entrance to his lair
Perry lifts a tree outside the house by the bottom of its trunk, making it fall on top of a car.

Evil Jingle
''Doofenshmirtz Evil Incorporated! (In his cellphone)''

Background Information

 * This is the first two-part episode of Season 4.
 * The moose is named Albert, which is also the name of Irving's brother.
 * Ninth episode that has a one-word title. ("Rollercoaster", "Excaliferb", "Blackout!", "Doofapus", "S'Winter", "Canderemy, "Bullseye!, "Atlantis")
 * Second time Perry teams up with a human agent. The first was in "Elementary My Dear Stacy" with Agent Double 0-0.
 * Sixth episode to focus on someone other than Phineas and Ferb for most of it ("Isabella and the Temple of Sap", "Not Phineas and Ferb", "Delivery of Destiny", "Road to Danville", "This Is Your Backstory").
 * Eleventh episode to begin at night. ("Traffic Cam Caper", "Elementary My Dear Stacy", "Oh, There You Are, Perry", "Invasion of the Ferb Snatchers", "Candace Gets Busted", "That's the Spirit", "When Worlds Collide", "Blackout!", "Happy New Year!", "Der Kinderlumper")
 * This episode takes place sometime around "Phineas and Ferb's Quantum Boogaloo", since Phineas mentioned building the super-structure.
 * Monogram breaks the fourth wall during the credits sequence by addressing the viewer, as does Doofenshmirtz when first climbing onto the train's roof.

Production Information

 * Both Samantha Bee and Kevin McDonald, who play the Canadian counterparts of Perry and Doof, are natives of that country (Bee was born in Toronto, while McDonald was raised in Montreal).

Errors

 * When Lyla first appeared, she was wearing a motorcycle suit. But after the criminals escape, she was now wearing her normal attire.
 * Despite taking place the day before The Bully Code, Doofenshmirtz's backstory is never mentioned or seen.
 * In the picture that Perry texts to Major Monogram for back up Professor Bannister is missing his glasses.
 * The episode incorrectly states that the Canadian Constitution Act was passed in 1864, when it was actually passed in 1867.

Continuity

 * A picture of young Vanessa in a fairy costume is seen again. ("Finding Mary McGuffin")
 * This episode takes place before "The Bully Code", which takes on Canada Day (July 1).
 * An fourth wall break in this episode finds Doofenshmirtz looking at the camera during the first chase scene to the roof of the train and tells the audience that "Eventually it would come to right here."

Allusions

 * Ocean's Eleven - The scene in which Perry, Lyla, Doofenshmirtz, Monogram, and Carl are in front of Niagara Falls is similar to the ending of the 2001 film.

Cast

 * Vincent Martella as Phineas
 * Ashley Tisdale as Candace
 * Thomas Sangster as Ferb
 * Alyson Stoner as Isabella
 * Caroline Rhea as Mom
 * Dan Povenmire as Dr. Doofenshmirtz
 * Jeff "Swampy" Marsh as Major Monogram
 * Tyler Alexander Mann as Carl
 * Dee Bradley Baker as Perry
 * Maulik Pancholy as Baljeet
 * Bobby Gaylor as Buford
 * Samantha Bee as Lyla Lolliberry
 * Kevin McDonald as Bannister
 * Additional voices: Charlie Schlatter, Eric Bauza, Jason Jones, Rino Romano.


 *  designates a character that did not appear in this episode