Does your boyfriend know you slept with anyone else? Are you and "the guy" in touch? Your best bet, if it is a matter of only keeping the baby if your boyfriend is the father, is to get a prenatal DNA test from Ravgen or the DDC. The prenatal tests (if from one of those labs, in other words, a reliable test) are very expensive, and to be totally certain you should test with both men. But then you would know. Don't use an Internet cheapie test.
Ideally, you should get an ultrasound, and to do this perfectly, do it in your seventh week (in other words, a week and a couple of days from now). Don't tell the doctor what was your first day of your last period, say they are irregular or that you don't remember, and ask the doc to give you an estimated due date (not just "weeks pregnant" figure). You can then plug that estimated due date into a conception calculator online and get an estimated conception date.
The problem is that the first guy's sperm would be viable in your body for 5-6 days after sex. (Some research says longer, some says that by the 6th day it is not strong enough to penetrate the egg.) So although you had sex with your boyfriend on the right day to get pregnant according to your app, if you ovulated slightly earlier than the app claims you did, the first guy is (just possibly) in range. So even an ultrasound indicating that your estimated conception date was, say, the 24th, would not help because there is that slim chance Guy A's sperm was still around.
Because this is a serious decision (literally life and death), I would find the money to do a test with Ravgen, and to test with both men. I know that is tough. In a perfect world, the men would share the cost.