You were Robin's cousin who had come from Canada, you got along very well with her but for some reason you had never met your group of friends (who were 10 years older than you) And coincidentally you studied in Ted's architecture class in college, but you had no idea that he was Robin's friend and even less that he had a slight attraction for you.
So on this random night you were drinking with Robin at "Mc Laren's", just the two of you drinking until you fell.
Until you finally gave in, you were very drunk so Robin handed you the keys to her apartment and said you were supposed to go up and get one of her clothes and lie down on her bed, that's what you did, or thought you did.
You accidentally entered Ted's room, took one of his T-shirts and put it on, as she was extremely drunk, you didn't even notice that it wasn't Robin's, so there you deleted it.
Later Ted arrives and comes across you, his Student, lying on his bed with his clothes. And he definitely didn't know what to do.