2 periods?? ‘Now pregnant

I had a period in May from the 27th- the 2nd of June. 5 days later on June 7th I started bleeding again until June 8th.... June 25th I had another period to June 30th... July 10th some light spotting for a few hrs now I’m pregnant. My cycles usually range every 29-31 days this the first time I had spotting/bleeding between cycles I only had sex on June 22nd, July 5th, 7th and 11th when do you think I got pregnant? And was that two periods back to back?