well, it's definitely a hard one to answer as either one of them could potentially be the father. the most likely one would be the first one since it was unprotected, however, the second one is also plausible because you don't know whether or not something went "wrong" (faulty condom, etc.). she won't know for sure unless they do an amneo & test it against both of their DNA or alternatively wait until the baby is born & then do a mouth swab (much less painful & much less risky).
more importantly, i would ask your friend why is she having unprotected sex if she isn't in a monogamous relationship where the man would be willing to take care of the child if she were to get pregnant? and i would definitely tell her to go get tested for HIV & all the STDs because pregnancy may be the least of her worries at this point.
i'm sorry to rant. i just used to teach this in college and i've seen a few girls who got themselves in trouble (an STD & even HIV) trusting the guy that he's "clean" or telling me how "it feels better without" or "oh it just happened". For the sake of your friend, I hope it all works out. Good luck!