It entirely depends on who you use. There are some cheapo so-called "labs" that are basically rip-offs. They do not test enough DNA to give a correct answer (if they run the test at all and don't simply lose the sample). Have you looked up consumer reviews on the lab you intend to use?
Regarding only testing with one guy, it's been my experience that women feel much more certain if they test both guys, one will get a clear "yes" and the other will get a clear "no," and each guy's test confirms the other's. Women who only test with one guy will often write in and ask, "He got excluded, but what if the test is WRONG?!?!?!" Even if it is a little more money, in your shoes I would test with both guys. If there is some reason that you simply cannot (such as, one guy is gone), be ready to feel at least some pangs of doubt.
Here is what I am getting from what you have said. Where you didn't answer a question, I just left it blank or marked it with a question mark.
First day of last period: December 20 [no information on how often periods come]
Sex with ("boyfriend" in first post; "ex" in later posts) December 31
Sex with "other dude" possibly January 3
Sex with "ex" January 4
Sex with other dude January 7, January 8
Dr. appointment January 10, no pregnancy detected (Were you tested for pregnancy then? Why, if so? That would have been pretty early to test considering that your last period was only on December 20. )
Blood test for pregnancy at hospital, January 16 (Again, what made you test this early? You would only have been a few days late and you had not had a pregnancy detected on the 10th.)
Positive urine-based home test for pregnancy January 16 (?)
Pregnancy center did ultrasound at "8 weeks" and said due date was September 21, pointing to ovulation December 29
Doctor did ultrasound at "12 weeks", said due date is September 26; was this based on the baby's actual size on the ultrasound, or was he just counting forward from your last period using the record fro your visit on January 10, or by using a little cardboard wheel or a calendar? Ovulation for September 26 would be January 3, except that this was a 12th-week ultrasound. There is a one-week margin for error when using a 12th-week ultrasound to try to determine conception (+/- 7 days), meaning a range of December 27 through January 10.
It would help to know if your cycles come exactly every certain number of days. Not how long you bleed, but if, should your period begin on a given day, you know then that your next one will come in exactly x days. What is the length of time from day 1 of a period to day 1 of your next period? Does it vary?
It is unlikely to have a positive home pregnancy test on the 16th if you got pregnant on the 7th. If you didn't have sex with the other guy before the 7th, that is promising.
If you feel like answering any other questions, I might be able to help you assess things further. Have you had an ultrasound? When was it (how early in the pregnancy)? Did they tell you a due date? How regular are your cycles, how often do your periods come?
You found out when you were 4 weeks pregnant, what exactly did you find out, that you were pregnant? Because they would not have been able to see a pregnancy by ultrasound at 4 weeks. How did you find out on January 16? Blood test? Home test?
With this amount of information only, it's hard to give you even an educated remark about the situation. If you are asking if, should the doctor be correct in guessing that you might have ovulated around the 3rd, could the other guy have gotten you pregnant on the 7th? I would say the doctor can't be sure you ovulated on the 3rd. Sperm lasting 5 days wouldn't apply to the 3rd vs. 7th question because it would last from the 7th on, not 5 days before the 7th. But again, unless your cycles come exactly every 28 days like clockwork every single month and have never, ever varied, your doc can't really say with certainty that you ovulated on the 3rd.
Do you have anything you could tag the sex with the other guy to, like, was it after the Thanksgiving holiday? Or did you wear a particular outfit and then didn't wear it again, but took it to the cleaners afterward and you could get the record? Did you keep a journal? Do you have gas receipts from going to see him? Did *he* keep some kind of journal or record?
If you got an early ultrasound, you could try to determine when conception was from the ultrasound results if the ultrasound was early enough in the pregnancy (6th or 7th week, so the time has gone by for this approach). But knowing when conception was might not help you figure out if the other guy has a chance to be the dad if you don't know for sure when sex with him was. Did you get an early ultrasound?