The Prophet ﷺ said, "Three people will receive their reward twice. A man who has a slave-girl, teaches her well, disciplines her with excellent manners, then frees her and marries her, he will have two rewards. A believer from the People of the Book who believed in his own scripture and then believed in the Prophet ﷺ, he will have two rewards. And a slave who fulfills the right of Allah and is sincere to his master."Then Shaybi said, "I have given this hadith to you for nothing, when a man would travel all the way to Madinah for something less valuable than it."
عن النبي ﷺ قال: ثلاثة يؤتون أجرهم مرتين: الرجل تكون له الأمة، فيعلمها فيحسن تعليمها، ويؤدبها فيحسن أدبها، ثم يعتقها فيتزوجها فله أجران، ومؤمن أهل الكتاب الذي كان مؤمنا، ثم آمن بالنبي ﷺ، فله أجران، والعبد الذي يؤدي حق الله، وينصح لسيده. ثم قال الشعبي: وأعطيتكها بغير شيء وقد كان الرجل يرحل في أهون منها إلى المدينة.
Bukhari narrated it in the Book of Jihad and Expeditions (3011), and Muslim in the Book of Faith (154:241), both of them from Salih bin Hayy Abu Hasan, who said, I heard Shaybi say, Abu Burda told me that he heard his father, meaning Abu Musa Ashari, mention it. The wording given is Bukhari's.