As Ted looks to his old relationships in the hopes of finding his one true love, Barney and Robin have a bet that puts the latter's job on the line.