Sperm carrying the x chromosome (that produce females) and sperm carrying the y chromosome (that produce males) are said to have different speed and longevity. The males swim faster, get there faster, and die sooner, and the females swim slower, get there later, and live longer. In theory, if a woman ovulates five days after sex with someone, the only sperm left would be the ones to produce females, the male-carrying sperm would have died off by about day three. That is the theory, anyway.
People use this information to try to time sex to have a certain gender -- a woman who is using ovulation test kits and wants a boy, will try to have sex right on the day she ovulates, so the fast-swimming male sperm would reach the egg and leave the slower-swimming females behind. It's obviously not a guaranteed method, mainly because women don't know for sure when they ovulate, even when using ovulation test kits. (Also, who knows if the blanket statement that males swim fast and die soon and females swim slower and last longer is true.) But it is an interesting piece of information to add to the mix for a woman who is looking for some possible confirmation that a certain guy is the dad.
Wht does the gender of the baby have to do with whos the father?
I assume it could be either guy since the first guy's sperm could have been alive in your system up to 5 or 6 days after sex. It will be interesting to see if the baby is a girl or a boy, if a boy it is more likely to be from the second guy (though neither guy is ruled out if it is a girl).