Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
bayhaqi:21720Abū ʿAbdullāh > Abū al-Walīd > al-Ḥasan b. Sufyān > Ḥibbān > Ibn al-Mubārak > Ibn Lahīʿah > Khālid b. Abū ʿImrān > Saʾalt al-Qāsim And Sālim

[Machine] About the offices they carry out half of their writing, then the offices write to their servant, then both of them strive, and the servant of the offices completes his writing, then the first one of them becomes helpless. Will he return as a slave or is it permissible to free him with what he has paid to his master? They said, if his master is the first one of them, then he allows him to write to him, so there is no way for him, otherwise he remains in his position.  

البيهقي:٢١٧٢٠وَأَخْبَرَنَا أَبُو عَبْدِ اللهِ أنبأ أَبُو الْوَلِيدِ ثنا الْحَسَنُ بْنُ سُفْيَانَ ثنا حِبَّانُ عَنِ ابْنِ الْمُبَارَكِ عَنِ ابْنِ لَهِيعَةَ عَنْ خَالِدِ بْنِ أَبِي عِمْرَانَ قَالَ سَأَلْتُ الْقَاسِمَ وَسَالِمًا

عَنِ الْمُكَاتَبِ يَقْضِي نِصْفَ كِتَابَتِهِ ثُمَّ يُكَاتِبُ الْمُكَاتَبُ غُلَامًا لَهُ ثُمَّ يَسْعَيَانِ جَمِيعًا فَيَقْضِي غُلَامُ الْمُكَاتَبِ كِتَابَتَهُ ثُمَّ يَعْجَزُ الْأَوَّلُ مِنْهُمَا أَيُرَدُّ عَبْدًا أَمْ يَجُوزُ عَتَاقَهُ بِمَا أَدَّى إِلَى سَيِّدِهِ؟ قَالَا إِنْ كَانَ سَيِّدُهُ الْأَوَّلُ مِنْهُمَا أَذِنَ لَهُ أَنْ يُكَاتِبَهُ فَلَا سَبِيلَ عَلَيْهِ وَإِلَّا فَهُوَ بِمَنْزِلَتِهِ