Ted also refers to his son as Luke, years before meeting Tracy.It is theorized that Penny's name comes from a specific episode in season 2, episode 15 titled "Lucky Penny".That night, Ted meets Tracy Mc Connell, and they fall in love, eventually getting married.
She is fiercely protective of Ted, and even goes so far as to break him up with women she does not believe are right for him - including Robin. She rejects his advances at first, but he wins her over after taking her on a two-minute date, complete with dinner, a movie and a goodnight kiss. She leaves her husband, The Captain, for him, and he briefly considers abandoning his dream of contributing a building to the New York City skyline so they can be together. At the end of the season finale, they convince Ted to go after Robin.
This episodes is big on letting us know how the HIMYM reoccurring theme of "let the universe do its thing", really effects the characters in the show.
Although things didn't go the way Ted wanted them to in the episode, he ended up not having to leave NYC.
Almost two years later, they get engaged and start to plan for a huge wedding.
In 2015, they delay the wedding because she gets pregnant with their daughter, Penny; she gets pregnant again in 2017 with their son, Luke.