It is narrated from Sayyiduna Abu Musa (may Allah be pleased with him) that they were sitting and mentioned what makes ghusl obligatory. Abu Musa (Muhammad bin al-Muthanna, one of the narrators) added these words in his narration: One of the Muhajirun who were present said: When the private part touches the private part, ghusl becomes obligatory. And one of the Ansar said: No, not until semen gushes out. Then the two narrations agree in meaning. Abu Musa (may Allah be pleased with him) said: I will bring you the answer. He went to Sayyidah Aishah (may Allah be pleased with her), greeted her with salam, and then said: I want to ask you about something, but I feel shy. She said: Do not be shy to ask me about anything you would ask your own mother who gave birth to you; I am your mother. He says: I said: What makes ghusl obligatory? She said: You have come to one who knows it well. The Messenger of Allah (peace and blessings be upon him) said: "When a man sits between her four limbs and the private part touches the private part, ghusl becomes obligatory."
Yahya bin Sa'id narrated it from Sa'id bin al-Musayyab from Abu Musa without attributing it to the Prophet (peace and blessings be upon him); only Ali bin Zayd bin Jud'an attributed it to him from Sa'id bin al-Musayyab, and the hadith of Ali bin Zayd is not used as evidence. The narration that Muslim recorded in the Sahih is an authentic, connected (musnad) narration.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الطهارة / 767