I would agree with your assessment that it's guy A, though it would obviously be clearer if the distance between the two guys was a few days more. But your ultrasound was early enough to be pretty precise, and it suggests conception around August 6, plus or minus maybe 1-2 days. Also, if the only time you had sex with the second guy was the day you expected your period to come, that's too late in your cycle to have been ovulating.
In your shoes, throughout the pregnancy I would assume guy A is the father, but would do a DNA test at the hospital when the baby is born both for peace of mind and for the baby's rights. Talk to your doctor, or call the family courts in your area of jurisdiction, to find out how to set up a test that is legally appropriate to prove paternity. (In other words, don't use a drugstore test, they are not admissible as proof due to the possibility of fraud.) When the guy goes to the lab, go with him and do the test together. That way you will have witnessed that it was him doing the swab and handing it over to the technician. Everything should turn out the way you assume, and your child's legal rights will be protected.
Congratulations on your upcoming baby!