Reference: ‘Ishratun-Nisaa. wa Hill al-Khilaafaat az-Zowjiyyah – Page 58
Question: I play around with my wife a lot and notice that I ejaculate without having sexual intercourse with her, and likewise, she plays around with me, and nothing comes out of her either. So is it obligatory we both take ghusl?
Response: If you ejaculated or she excreted some fluid, then it is obligatory upon both of you to take a ghusl. However, if you ejaculated and she did not excrete any fluid, then she does not have to take a ghusl, rather you yourself have to. Likewise, if she excreted some fluid and you did not ejaculate, then she herself has to take a ghusl.
And if you both had sexual intercourse and no ejaculation occurred, and she did not excrete any fluid, then it is upon you both to take a ghusl, according to the hadeeth of Abu Hurayrah (radhi-yAllaahu ‘anhu) that the Messenger of Allaah ﷺ said:
«If he (the husband) sits amidst her (the wife’s) four parts, then had intercourse with her, then ghusl becomes obligatory even if he did not ejaculate», transmitted by Imaam Muslim.
So ghusl is made obligatory if one ejaculates [or excretes fluid in the case of a woman] even if sexual intercourse did not take place, and likewise, it is obligatory if sexual intercourse takes place and ejaculation did not occur. So it is obligatory in both cases.