Eventually, the kids were re-captured and tied up, and suspended over a vat of acid.
"Who keeps a vat of acid in their house?" Candace asked "I mean seriously, what's up with that?"
"Impressive, no Agent K?" Dr. Scorpious asked "you attempted to break in here to rescue your kids and stop my plans. Now, all you can do is watch helplessly as they take an acid bath."
"When I regain use of my limbs, you're in for one serious butt kicking!" Agent K replied.
"Mere idle threats," Scorpious told her "once my immobilization ray is at full strength and this town is ours, you will be effectively disposed of. And there's no way you'll recover from your paralysis before that happens. Face it Agent K, it would take a miracle to save you now."
Unknown to the lisping villain, a miracle was on its' way, in the persona of Dr. Doofenshmirtz.
"Okay, we made it into the basement," Doofenshmirtz explained "now all we have to do is cut the power, and that Scorpious guy can't use any of my inventions anymore."
Before the two could make their way to the power stations, they heard footsteps approaching. Agent P whirled around and got into a fighting stance, prepared to deal with the threat, whatever it might be.
"Hi sir."
"Norm? What are you doing down here?"
"Dr. Scorpious had me sent down here," Norm explained "he said this is where all of your junk belongs."
"Hey, I don't have any junk!" Doofenshmirtz replied angrily "well, except for my pile of garbage in the corner there. So Norm, what's doctor jerk up to?"
"I have no idea; I've been down here for the last few hours."
"Well look, we're gonna cut the power and take that home stealer down a peg. Wanna help?"
"You bet dad."
"I thought we had a talk about the 'dad' thing," Doofenshmirtz said "never mind, we'll discuss this later. Okay Perry the platypus, now what we need to do is trip each switch one at a time, because we don't want a complete power…" he turned and saw that Agent P was flipping switches in the fuse box as quickly as possible.
"You're not even listening to me, are you Perry the platypus?" he asked, then sighed "why do I even bother?"
Naturally, this resulted in the power going out all over the building, including the main penthouse apartment.
"What the heck just happened?" Scorpious asked "did the guy forget to pay his power bill or something?"
"What are we supposed to do now? We can't send them to their doom without power, thank you very much," Khaka asked.
"There must be a problem with the transformer or something," Scorpious replied. He tried to glance around in the dark until he located one of his henchmen. "You there, go find out what's wrong and fix it. I'm on the cusp of achieving ultimate revenge here!"
"Okay, hold your horses," the henchman replied as he headed off.
"Sorry for the delay, your doom will be in just a moment," Scorpious addressed the hostages.
"Don't hurry on our account," Riley replied sarcastically.
Using a flashlight, the henchman made his way down to the bowels of the DEI building.
"What kind of evil scientist doesn't have a backup generator?" he asked to no one in particular as he used his flashlight to pierce the darkness "luckily our boss isn't that stupid."
Eventually he made his way to the main power room. "Hmm, looks like these switches got turned off," he said "oh well, all I have to do is switch 'em back on and…"
He didn't get a chance to finish that sentence when a powerful beaver-like tail slapped him right in the face, causing him to drop the flashlight.
"Okay, who's the wise guy?" the henchman asked, "come out and show yourself."
Agent P didn't respond (although he couldn't anyway) and instead focused on dazing the goon with a series of well-timed karate moves. Even in the darkness, the agent platypus was able to expertly land his blows, and the henchman slumped to the floor.
"I could've knocked him out for you," Norm stated matter-of-factly.
"Okay, so you beat up that guy, now what?" Doofenshmirtz asked.
Agent P said nothing and flipped all the switches back, restoring the power. "Wait, why the heck did you shut all the power off in the first place?" a confused Doofenshmirtz asked "do you even have a plan, Perry the platypus?"
Sighing, Agent P reached into his fedora and produced a piece of paper. Pulling a pen from his fur (don't ask how) he scribbled down something, and then handed it to Doof.
Doofenshmirtz scanned the paper Agent P had given him "Oh, that makes perfect sense; why didn't you just say that to begin with? Oh right, you can't talk."
"Ah, looks like that idiot fixed the problem," Scorpious said, in the once again lighted apartment "now then, where were we? Oh yes, all of you were about to take an acid bath!"
"I don't even like taking regular baths!" Todd exclaimed.
"No kidding dude, you reek," Jacobo added.
"I didn't want to say anything earlier, but you do," Sheldon chimed in.
"Thanks a lot for the encouragement guys," Todd replied.
"Before the flesh is melted from my bones, I wish to declare my love for the fiery-headed Riley Daring," Baljeet added.
"That's really sweet, but we need to talk about this when we get out of here," Riley told him.
"She wants to discuss where you'll be going on your date," Todd chimed in.
"Todd, please don't encourage him."
"Hey, if I'm going down, I'm going down annoying you," Todd explained.
"Okay, if all the minor chatter is done, let's get this over with," Scorpious said, heading over to the button that activated the crane.
"Any last words?" Scorpious asked "they can be sappy, I don't care."
"Not so fast!"
Scorpious & the other villains turned and noticed Doofenshmirtz & Norm in the doorway.
"Oh not you again," Scorpious said "I thought I sent you down a trapdoor."
"Hey, that wasn't my first time falling down a trapdoor, and it won't be my last," Doof replied "now let Vanessa go! And… those other kids too, I guess; I don't really know them, but they seem nice."
"Please, you think you and your obsolete robot can stop me?" Scorpious asked "in case you haven't checked, it's four against two. Well five, if my henchman would ever get back from the basement."
"He won't be back for a while, Perry…I mean, I knocked him out, without any help from a platypus," Doof explained.
"Okay, that was a weird thing to say," Scorpious replied "but you're too late anyway. You'll never be able to stop the crane in time."
"Hey, who's that pharmacist Scorpious is arguing with?" Riley asked, craning her head to look at things.
"Oh, that's my dad," Vanessa explained.
"That's you dad?" Candace asked "and he can afford this place? The pharmacy business must be doing better than I thought."
"He's not a pharmacist, he's an inventor, remember?" Vanessa said "I just hope he knows what he's doing."
"No cocky comeback Doofenloser?" Scorpious asked "I can't believe you're even a villain; you're the most pathetic villain I've ever seen, and I know a lot of villains."
"What do we do with him, throw him down the trapdoor again?" Regurgitator asked.
"Why bother, there's nothing he can do stop us anyway."
"That's where you're wrong Mr. penthouse stealer," Doofenshmirtz replied "see, me and Norm may not be able to stop you, but we're very good at providing a distraction while Perry the platypus rewires your evil invention thing, which I still don't know what it does. Oh, wait, I wasn't supposed to mention that distraction thing yet."
Scorpious looked over and noticed Agent P tinkering with the immobilizing ray's controls.
"I never thought I'd actually be saying this, but get that platypus!" he yelled.
Regurgitator & Khaka ran towards him; Regurgitator attempted to grab him, but Agent P slipped between his arms and slapped him in the face with his tail.
"Hey, is that a platypus I see fighting the bad guys?" Sheldon asked from his position on the crane.
"I doubt it," Phineas replied "platypi don't do much."
"Oh, my mistake then."
Khaka made a run at Agent P, but he slipped between his legs and tripped him, sending him headfirst into the ray.
"Okay, this plan officially stinks, thank you very much."
"You won't defeat me that easily, platypus!" Regurgitator yelled, trying in vain to hit Agent P, who kept dodging his blows, before coming to rest atop the immobilization ray.
"Gotcha now!" he said, grabbing for Agent P; naturally, the duck billed agent jumped to the floor, and the villain's weight caused the ray to spin around and slam into him, knocking him unconscious.
Agent P then pointed the ray at Agent K and fired, releasing her from her immobile state.
"Thanks for the assist," she said, as Agent P simply nodded.
"Now then Scorpious, as I was saying earlier, it's over."
"Not so fast Agent K," Scorpious said, getting closer towards the crane controls "you take one step closer and this thing goes on turbo speed. Even with your spy training you'll never be able to save them in time. I may not be able to take over the world, but at least I'll be able to exact my revenge on you!" he said, moving to press the button.
As his finger reached ever closer, he suddenly felt himself unable to move. Looking forward, he realized it was Doof behind the immobilization ray.
"Take over my penthouse and kidnap my daughter will you?" Doof asked, "Who's the pathetic villain now, buddy?"
"No! My revenge, my plans for world conquest, ruined!" Scorpious raged "and to make matters worse, I was foiled by a moron and a platypus."
"Yes I'm sure your fellow inmates in prison will have quite the laugh about that," Agent K replied "now then, if you'll excuse me."
K approached the controls and maneuvered the others away from the acid pit and towards the floor, then lowered the crane. Soon everyone was free.
"I never doubted that you'd come to rescue us," Riley said, hugging her mom tight.
"You and your brother are the most important things in the world to me," K replied "I'd never let anything bad happen to you."
"So, that means I won't get punished for borrowing Phineas & Ferb's invention?" Todd asked hopefully.
"Oh no, we're going to have a little discussion about that later," K said "right now, we need to call the authorities to come pick up Scorpious and his allies."
"This isn't over Agent K!" Scorpious yelled, still under the effects of his ray "I'll be back. And don't think I'll forget about this Doofenshmirtz, I'll get you too!"
"Join the club pal," Doofenshmirtz replied.
"Much obliged for all your help Mr. Doofenshmirtz," K said, "I'm not sure we could've stopped him without you."
"It's Dr. Doofenshmirtz, and really the whole thing was Perry the platypus's idea," Doof replied "isn't that right…hey, where'd he go? I'm sorry, he always kind of disappears like this."
"Well thank him for me when you see him next," K said "we have to be going now."
"Okay, well, thanks for visiting," Doof said, watching as everyone left; once they were out the door, he looked at the immobilization ray.
"No reason to let a perfectly good evil plan go to waste," he said "all I have to do is rename this thing the Immobilize-inator, point it at the Tri-State Area, and name myself supreme ruler!" he said, laughing evilly.
Just then, Agent P emerged from under the device.
"Oh Perry the platypus, there you are," Doof said "that British lady said she wanted me to say thanks for her, so 'thanks' I guess. Anyway, I know you helped me earlier, but now that I'm back, things are going back to the normal…"
Agent P said nothing and pushed a button on the immobilization ray, then ducked down as it exploded.
"My brilliant evil plan that I borrowed from that other guy, ruined! Curse you Perry the platypus!" Doofenshmirtz yelled, as Agent P hanglided out of the building.
A few moments later, everyone arrived back at the Fletcher-Flynn residence, where Linda met up with them.
"There you are, where have you been all day?" she asked "and why are you wearing a giraffe costume Candace?"
"Never mind mom, I'm going to bed; I've had a loooong day," Candace said, heading off to her room.
"Yeah, I should probably be getting home too; see you Mrs. Flynn," Stacy added, before dashing off.
"Well, I hope everyone is ready to attend Riley's award ceremony," Linda said, "it should be coming up very soon. And Katherine, I hope your diarrhea has cleared up."
"Come again?"
"Dick told us that was why you skipped out earlier."
"Ah yes," Agent K replied "my diarrhea. Yes, I don't think that shall be a problem. However, I am sorry to say I have learned that the ceremony has been cancelled."
"Oh that's too bad, and I bought a nice dress for it and everything," Linda said "I'm sure you're just crushed Riley."
"Eh, I heard it wasn't that great anyway," Riley lied.
"Thank you so much for your hospitality, but I'm afraid we'll have to be heading home," K continued.
"Well it was so nice to see you again," Linda said "won't you at least stay for dinner?"
"I suppose a few more hours can't hurt," K replied.
After dinner, the Darings and their friends prepared to leave. But before they could, there was something Riley needed to take care of first.
"Hi, Baljeet, is it?" she asked, approaching the Indian boy in the backyard.
"Good evening my love; I have written a poem detailing your many attributes, would you like to hear it?"
"Yeah, about that…" Riley began "look, you seem like a nice kid, but I don't think it would work between us. I mean, I'm a teenager and you're…I'm assuming younger than that."
"But I am very smart for my age."
"Okay, but there's the whole distance thing; I mean, long distance relationships rarely work out."
"True, but with the large number of social media devices now available, we can stay in touch every day," Baljeet explained.
"Wow, you are not making this easy for me," Riley commented "the thing is, we don't really know each other, you know? And I'm flattered you think I'm a goddess and wrote a poem about me and stuff, but, I think I'd prefer to date someone my own age. Do you understand?"
"I guess so," Baljeet said sadly "I suppose I was foolish to believe a girl like you would ever want to be with a lowly boy like myself."
"Hey don't say that," Riley said "you're a great kid and you'll make some girl real happy some day. Besides, you're exotic, and girls really go for that."
"Really?"
"Yeah, look at my friend Tasumi; she's dating Jacobo, and he's Hispanic," Riley said "anyway, it was really fun meeting you; you take care of yourself, okay?" she added, before giving him a kiss on the cheek and walking off.
"I shall never wash this cheek again!" he exclaimed happily "oh, who am I kidding? Of course I will; I do not wish to get an infection."
Elsewhere in the backyard, Todd was saying goodbye to the titular duo.
"Thanks for all the fun you guys," he said "hope you aren't still mad about the whole me borrowing your supersuit thing."
"Water under the bridge," Phineas replied.
"You mean that?"
"Oh no, I was thinking about tomorrow's project; causing water to flow under the local bridge," Phineas explained "but we don't mind that you borrowed the Beak suit."
"I just feel sorry for whoever had to control the bottom half," Ferb added.
Eventually, they all packed in C.A.R and said their final goodbyes.
"So long Lawrence," Dick said "send me a bill for those antiques."
"Don't worry about it; there are plenty more where those came from," Lawrence replied.
"Bye Candace," Riley called "good luck with your brothers."
"And good luck with yours."
"Thank you so much for visiting Katherine," Linda said "if you and your family are ever in town again, you know you're always welcome here."
"Well, my job keeps me pretty busy, but perhaps we'll take you up on that offer," K said. Then, after everyone gave a final wave, C.A.R pulled out of the driveway and began the journey home.
"Okay Tasumi, you were right, my family does always have weird adventures, even when we're not trying to," Riley admitted to her friend.
"Yeah, and this was one of your better ones," Tasumi added.
"Thankfully though, it's over and now I can look forward to getting home and cracking open a good book," Riley told her.
"Guys, check out this article in a newspaper I have for some reason!" Dick yelled excitedly, pointing to a picture in said newspaper "it's about a noseless kid daredevil; look at him, I think he could be my long lost son!"
"Whoa! I have a brother?" Todd asked in shock.
"No you don't," Riley said "dad, you don't have a long-lost son."
"Oh, and you know everything about my life Riley?"
"Pretty much, yeah."
"Well…I'd still like to meet the kid," Dick said "can we meet him K? Can we please?"
"I don't know; what do the rest of you think?" K asked.
Everyone except Riley expressed their interest in going.
"Then it's settled," K replied "C.A.R, track down this boy and set a course for his hometown."
"Yes K," C.A.R. replied.
"Isn't this neat Riley? We could be meeting our long lost brother!" Todd said happily.
"Whatever, just wake me up when we get there," Riley replied angrily, attempting to get some sleep as the Darings and friends headed off for another wacky misadventure.
