I can see why this is confusing to you. You did have unprotected sex with your boyfriend in a time of your cycle when you could easily get pregnant. But, usually if you have a period that lasts 4 days it is less likely that you are pregnant. At the same time, there are many stories from women who say they had a period and they were still pregnant.
You used a condom with the second partner. But, we know that condoms are not 100% reliable because they make break, leak or fall off. Also, if you have genital contact (penis to vagina) before the condom is on, there is a chance that you can become pregnant.
Unfortunately, I cannot tell you who the father is. I believe the only way to know for sure is to have a paternity test. This is not something we provide, so I am not an expert on that.
Please leave a comment to let us know if that answers your question or if you need more information.
For other readers, please feel free to leave a comment, or let us know if this was helpful.