How I Met Everyone Else - S3-E5
Corrected entry: In this episode we get to see when Ted met Marshall. But in Season 2, episode 1 Ted says to Marshall, "And there was my roommate, lying on the bed with his feet up on the wall. He had headphones on, big smile on his face. That guy was you." In this episode we get to see it was different. (00:04:40)
Correction: I just watched this episode and you've taken it out of context. Ted had picked a time before Marshall had met Lily to show him that he can be happy without her and used walking in to see his confident, happy room mate as an example. At no point does he say that that was the first time they met.