ENOfficial
Narrated Ibn `Umar: The Prophet (ﷺ) said, "Whoever manumits a slave owned by two masters, should manumit him completely (not partially) if he is rich after having its price evaluated."
Source: sunnah.com
Other translations
Arabic
حَدَّثَنَا عَلِيُّ بْنُ عَبْدِ اللَّهِ، حَدَّثَنَا سُفْيَانُ، عَنْ عَمْرٍو، عَنْ سَالِمٍ، عَنْ أَبِيهِ ـ رضى الله عنه ـ عَنِ النَّبِيِّ صلى الله عليه وسلم قَالَ " مَنْ أَعْتَقَ عَبْدًا بَيْنَ اثْنَيْنِ، فَإِنْ كَانَ مُوسِرًا قُوِّمَ عَلَيْهِ ثُمَّ يُعْتَقُ ".
sunnah.com