The Flynn-Fletcher family goes for a trip to the local museum, and while the parents are enamored by the dinosaur exhibit, Phineas and Ferb find themselves excited by the “Gadgets Through the Ages” section. Finding an old time-machine, the boys decide to repair it; but everything goes wrong when they get themselves and Candace trapped in the Cretaceous Period. Somehow, they need to get a message back to the present, so Isabella and the Fireside Girls can rescue them!

Perry, meanwhile, is dealing with a personal crisis… coming into Doofenshmirtz’s lair that day, he hears the incriminating sound of fighting, and a paw print on his cheek. It turns out that the doctor has been fighting another nemesis, Peter the Panda, behind Perry’s back! Deeply hurt, Agent P discovers that [[FoeRomanceSubtext without someone to stop, his life just isn’t quite the same - and even Doof finds himself missing his monotreme]].
----
!!Tropes
* AnachronismStew: The characters encounter a ''T. rex'' and other dinosaurs in what is claimed to be 300 million years ago. In reality, this is long before the first dinosaurs even evolved, and in fact the only reptiles alive at the time ''at all'' would've predominantly been very small lizard-like animals.
* AquaticSauropods: The boys and Candace escape from a ''Tyrannosaurus'' by grabbing onto reeds dangling from the mouth of a feeding ''Alamosaurus'' that is standing in a body of water.
* BatmanGambit: Doofenshmirtz was only pretending to dump Perry, to ultimately get as many secret agents together as he could, to take them all out.
* BlackComedy: Phineas sees the skeleton of a dog named Bucky at the museum, and mentions that the family had a dog called Bucky who got sick and [[DogGotSentToAFarm was sent to live on a farm with Kindly Old Man Simmons.]] He then finds a skeleton which his father identifies as Kindly Old Man Simmons, before quickly hurrying them along to get some milkshakes.
* DoesThisRemindYouOfAnything: Perry getting replaced as Doofenshmirtz's nemesis is played like a breakup, and Peter getting treated like a homewrecker. They even got on a talk show with Peter getting booed by the audience.
* {{Foreshadowing}}: A museum guide tells the visitors that, had Xavier Onassis finished building his time machine, he'd able to be among them. A later episode reveals that he did build a full functioning time machine and used it to go to a future when Candace has kids of her own.
* GentleGiantSauropod: The boys and Candace escape from the ''Tyrannosaurus'' by grabbing onto some reeds dangling from the mouth of a feeding ''Alamosaurus'', who places the three onto safety after being informed by Phineas.
* GetBackToTheFuture: After their time machine is broken.
* GoodTimesMontage: The song "My Nemesis" is a variation of one of these, with Doofenshmirtz reminiscing happily about the time he spent fighting with Perry the Platypus.
* GrayRainOfDepression: Perry goes into one after Doofenshmirtz dumps him as his nemesis.
* GreatBigBookOfEverything: "Please turn to the 'Time Travel' section of your Fireside Girls Manual."
* HarmlessElectrocution: When Candace yells at the boys for making a time machine that has to be plugged in to work (thus leaving them stranded even after Isabella comes back to rescue them), she holds the power cord up and yells "Where are we supposed to find electricity in Dinosaur Land?!?". Immediately, Candace is struck by a bolt of lightning, which gives the time machine enough power to transport them to the present. Surprisingly, Candace doesn't die from this.
* HumanChess: Doofenshmirtz reveals that him getting Perry the Platypus and the rest of OWCA's agents on a talk show was an elaborate plan to freeze them in suspended animation with his Freezeanator, and use them for a giant chessboard.
* LostLoveMontage: Perry, thinking of the times he fought Doofenshmirtz.
* MeadowRun: Perry and Doofenshmirtz appear to be doing a Meadow Run in the bridge of "When We Didn't Get Along"... but it ends with Perry kicking Doof in the face.
* TheOnlyOneAllowedToDefeatYou: This episode reveals that this is Doofenshmirtz and Perry's feelings regarding each other -- when Doofenshmirtz fights a different secret agent named Peter the Panda, Perry was so hurt that he quit being a secret agent, and Doofenshmirtz himself later thinks that Peter went too far when he disassembled Doofenshmirtz's (fake) Freezanator.
* OpenTheIris: Seen on Phineas as he sees the "Gadgets Through the Ages" exhibit at the museum.
* ReactiveContinuousScream:
** This happens briefly when Candace accidentally warps in front of the guard.
** This happens again when Candace approaches dinosaurs that resemble her.
* RewindReplayRepeat: This occurs in the TheStinger, where Lawrence is replaying the theme song for the museum audio tour in his recorded tape over and over again, much to his wife's amusement.
-->'''Lawrence:''' Fossils... da da da...
* RippleEffectIndicator: Mud fossils keep getting changed as the mud in the past is altered.
* SkewedPriorities: Screaming inside the museum is considered just as bad as stealing a pterodactyl fossil. The boy expelled for doing the latter still has it to show Candace.
* ShoutOut:
** ''Dr. Feelbetter'' is a nod to ''Series/DrPhil'', while also containing elements of ''Series/TheJerrySpringerShow''.
** The museum's TimeMachine looks practically identical to the one in...well...''Literature/TheTimeMachine''.
** When the gang returns to the present, Candace's hair briefly takes on the form of the ''Film/BrideOfFrankenstein''.
* TheStinger: The credits features Lawrence replaying "Fossils... da da da" over and over again on the recorded tape while in bed with Linda.
* TalkShowAppearance: Doofenshmirtz and Perry appear on the ''Dr. Feelbetter'' talk show in an attempt to settle their differences... until Doof reveals his real plan to freeze the other animal agents.
* TakenForGranite: Doofenshmirtz's Freezeanator temporarily petrifies Major Monogram, so Carl has to give Agent P his assignment. Later on it manages to freeze a ''Tyrannosaurus'' that our heroes have accidentally brought back from the past, naturally a split-second before it would have eaten them (and Mom would have seen it). Conveniently, it happens to be in the local museum, so everybody assumes it's just a statue.
* TemptingFate: In the past, while waiting for the Fireside Girls to fix the time machine, Candace comments that things couldn't possibly get any worse, and it immediately starts raining.
-->'''Candace''': [[DeadpanSnarker Oh, look. The world's very first]] BadHairDay.
* TerrifyingTyrannosaur: The boys and Candace get attacked by a ''Tyrannosaurus'' upon going back to the Cretaceous Period, the dinosaur proceeding to menace them throughout the episode.
* TimeMachine: That looks just like the device in ''Literature/TheTimeMachine''.
* WhatHappenedToTheMouse: Major Monogram is never unfrozen by the end of the episode.
* WriteBackToTheFuture: Phineas writes a message in a dinosaur footprint, which is fossilized and preserved in the museum. This almost goes awry when Phineas misspells "time" as "tie" in his original blueprints, causing the Fireside girls to make the wrong machine at first.
* XRaySparks: We can briefly see Candace's skeleton when she gets struck by lightning.
* YourSizeMayVary: When the ''Tyrannosaurus'' first appears, it is overly gigantic that it can crush the time machine with its foot, but for the rest of the episode, it is scaled at around 15-18 feet high.
----