The Messenger of Allah ﷺ said, "There are three who are given their reward twice. A servant who fulfills the right of Allah and the right of his masters, he is given his reward twice. A man who has a beautiful slave girl, and he educates her and educates her well, then frees her and marries her, seeking by that the pleasure of Allah, he is given his reward twice. And a man who believed in the first Book, then the later Book came and he believed in it as well, he is given his reward twice."Ibn Abu Umar narrated to us, Sufyan narrated to us, from Salih bin Salih, who is the son of Hayy, from Shaybi, from Abu Burda, from Abu Musa, from the Prophet ﷺ, a similar report with the same meaning.
حدثنا هناد حدثنا علي بن مسهر عن الفضل بن يزيد عن الشعبي
قال رسول الله ﷺ ثلاثة يؤتون أجرهم مرتين عبد أدى حق الله وحق مواليه فذاك يؤتى أجره مرتين ورجل كانت عنده جارية وضيئة فأدبها فأحسن أدبها ثم أعتقها ثم تزوجها يبتغي بذلك وجه الله فذلك يؤتى أجره مرتين ورجل آمن بالكتاب الأول ثم جاء الكتاب الآخر فآمن به فذلك يؤتى أجره مرتين حدثنا ابن أبي عمر حدثنا سفيان عن صالح بن صالح وهو ابن حي عن الشعبي عن أبي بردة عن أبي موسى عن النبي ﷺ نحوه بمعناه
Agreed upon [by Bukhari and Muslim]. Bukhari also recorded it in the chapter on Marriage, in the section on taking concubines and on one who frees a slave girl and then marries her, hadith no. 5083, and Muslim, hadith no. 154, from the hadith of Shaybi, with this same wording.