Roger Federer's final match will see him play alongside old rival Rafael Nadal in the Laver Cup doubles on Friday.