It was narrated from 'Ubadah bin Samit from Rubai' bint Mu'awwidh bin 'Afra'.:
He said: "I said to her: 'Tell me your Hadith.' She said: 'I got Khul' from my husband, then I came to 'Uthman and asked him: "What waiting period do I have to observe?" He said: "You do not have to observe any waiting period, unless you had intercourse with him recently, in which case you should stay with him until you have menstruated." In that he was following the ruling of the Messenger of Allah (ﷺ) concerning Maryam Maghaliyyah, who was married to Thabit bin Qais and she got Khul' from him.' "
English reference: Vol. 3, Book 10, Hadith 2058
Arabic reference: Book 10, Hadith 2136