The tennis legend played doubles with long-time rival and friend Rafael Nadal at his side for his final match.