Hector the Horrid is the fifth episode of season 3
Hector the Horrid: Phineas and Ferb bring a new coal hopper, Hector, to the yard, and warned Rosie that he is very aggressive. Hector proves that point to Rosie when Percy tries to shunt him, to which he replies by roaring "KEEP AWAY!" He later scares Diesel, and that was the last straw for Rosie, and as a result, she decides to teach Hector a lesson by bumping him very hard. Unfortunately, she bumps Hector so hard that he derails. When Thomas helps Hector back on the rails, Hector reveals Rosie was aggressive so he wouldn't have to carry coal. Rosie shows him it is no hardship, and now Hector is the best-behaved freight car in the yard.