The Messenger of Allah ﷺ said, "Three people will receive a double reward. A man from the People of the Book who believed in his prophet and then believed in Muhammad ﷺ. A bondsman who fulfills both his duty to Allah and his duty to his masters. And a man who has a slave-girl, raises her well, teaches her well, then frees her and marries her. He will receive two rewards."
قال رسول الله ﷺ: ثلاثة لهم أجران، رجل من أهل الكتاب، آمن بنبيه، وآمن بمحمد ﷺ، والعبد المملوك إذا أدى حق الله، وحق مواليه، ورجل كانت عنده أمة، فأدبها فأحسن تأديبها، وعلمها، فأحسن تعليمها، ثم أعتقها، فتزوجها، فله أجران.
Bukhari narrated it in the Book of Knowledge (97), and Muslim in the Book of Faith (154), both from the hadith of Salih bin Hayan, who said, Amir Shaybi said, Abu Burda narrated to me, from his father Abu Musa, and he mentioned it. The wording is Bukhari's, and Muslim's wording is similar.