Wait. Wait wait wait wait! Which one was the girl!? Luffy or Law? My money is on Luffy btw since he has no desire for sex, being asexual and all, so it'd be difficult for him to maintain a hard on probably.
I picture it more as both refuse to stay female for longer than a few minutes, so Law just uses his Ope Ope powers to get the required female gamete and Ope Opes it into a willing volunteer of a woman, using his powers to merge the two gametes. As for who gets turned into the woman for those short two or so minutes, I’m not too sure yet.