Looking back, it seems How I Met Your Mother season 1 had a big clue for how the series would ultimately end. After nearly a decade of teases and near-misses, Ted Mosby finally met the love of his life on How I Met Your Mother, but she didn't turn out to be the woman he ended up with. After revealing Ted's relationship with the "Mother", aka Tracy McConnell, the hopeless romantic went back to his former flame, Robin Scherbatsky. The stars realigned for the former couple, forcing fans into a frenzy at the big twist but a season 1 clue hinted at what was coming.
During How I Met Your Mother's pilot episode, Ted went on a date with Robin but scared her away after revealing his love for her on the first date. The duo then embarked on an on-again-off-again relationship throughout the series. The timing never seemed right before Ted and Robin and seemed like the series came to terms with the fact that they were better as friends. They each looked for love in other places with less than pleasing results. Ted finally found what he was looking for when he met Tracy. Around that time, Robin may have unearthed her true feelings for Ted but by then, it was too late. It wasn't until years after Tracy passed away did Ted and Robin find their way back together.
The penultimate episode in How I Met Your Mother season 1 may have provided a major clue into Ted and Robin's fate at the end of the series. The episode "Milk" featured Ted receiving a call from Love Solutions, the matchmaking service he previously signed up for, saying that they found him the "perfect match". By the end of the episode, Ted decided not to meet the woman because he still wanted Robin. The file on the perfect match, however, stated that Ted's potential date played bass guitar and her favorite book was Love in the Time of Cholera. The plot of that book interestingly mirrored what happened between Ted, Robin, and Tracy in the end.
The 1985 novel was written by the Colombian author and Nobel prize winner, Gabriel García Márquez. The bittersweet love story followed a young couple, Florentino Ariza and Fermina Daza. After spending their youth in love, Fermina broke off her romance with Florentino. The pair grew apart and Fermina fell for another man, Dr. Juvenal Urbino. Fermina and Urbino eventually married and grew old together before Urbino's tragic death. After five decades apart, Fermina and Florentino found their paths crossing and they ended up together by the end of the novel. As for How I Met Your Mother, Ted was the Fermina character in the situation whereas Robin was Florentino, the one who waited on the sidelines for many years.
It's also important to note that when Ted first met Tracy at the Farhampton train station, he was reading Love in the Time of Cholera on the platform. When Tracy approached the platform, she was holding her bass guitar. These two details were a callback to Ted's perfect match in "Milk". Although the match may have not been Tracy, it was meant to prove that there was a woman out there that he was meant to meet. How I Met Your Mother allowed Ted to live out the perfect life with Tracy until the situation took a tragic turn. Ted's favorite book may have helped his acceptance when it came to setting his sights back on Robin by the end of the series.