These scenes were surprisingly left on the cutting room floor.
Before Nathan Kress was Freddie Benson on iCarly, he played an uncredited kid on the "Battle of Panthatar" episode of Drake & Josh. However, he originally had a bigger role on the episode that involved him HITTING ON MIRANDA COSGROVE. (Well, hitting on her character, Megan.)
Dan Schneider, who created both Drake & Josh and iCarly, told Seventeen that on the episode, "Megan goes to this cool party and there's this 'rich boy' who's shorter than her and looks about two years younger." Basically, Nathan's character "follow[ed] [Megan] around and tr[ied] to flirt with her."
Nathan had about five lines, "always coming up to Megan at the party, trying to flirt and impress her, [but] she's not interested."
When it came time to edit the episode, Dan was also in the process of creating the iCarly pilot, on which Nathan had already been cast to play Freddie - a kid who's constantly trying to impress and flirt with Carly.
Dan wanted that relationship to be "fresh and new in iCarly," so he edited out Nathan's part in the Drake & Josh episode, though you can still see him in a couple of shots.