You had sex with "A" on day 5 of your cycle.
You had sex with "B" on days 8, 9, 15 and 16.
You would normally ovulate between about days 11 and 16 of your cycle. Sperm can survive up to about 5 days - max. The egg is viable for about 48 hours after ovulation.
It is unlikely guy "A" is the father, due to timing. There is always a possibility however.
You had sex with guy "B" at/near your peak fertility. He is very likely the father.
Hope it helps. A DNA test can confirm.