Ibrahim (may Allah have mercy on him) narrates from Abidah al-Salmani (may Allah have mercy on him) that this slave woman is not lawful for him except through the same way by which she became unlawful for him, (concerning the case) where a man gave a slave woman two divorces and then bought her. He said: When a slave woman was married to a man and he gave her two divorces, and then the slave woman's master kept having intercourse with her, the master does not make her lawful for the husband. Had he been her husband, he would make her lawful for the first.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الرجعة / 15206