Possible getting pregnant while on birth control???

Hi ladies I'm sort of freaking out. I had my postpartum follow up appointment on Wednesday. My doctor prescribed birth control because my husband and would like to wait a few years for baby no. 2. On Tuesday (the day before my appointment) my period finished up. Or so I thought, on Wednesday afternoon my period reappeared for a last wave goodbye. So Wednesday evening I had sex with my husband for the first time since I had my baby because I had been put on birth control. I've never taken birth control before so I took my birth control Wednesday evening so just to be safe I thought the meds will take atleast 24 hours to kick in so a little tmi but we used pull out method. Then on Thursday we had sex again in the evening and this time we didn't pull out because I thought the medicine would have kicked in since it had been 24 hours. Today is Friday and I forgot to take my meds, so I took it when I remembered which is 4 hours later than my set time for taking it. My doctor didn't give any description of when it would be effective she simply said I'm good to go. I Googled it and it says I needed to wait 7 days before having unprotected sex while on the pill. I'm seriously freaking out right now. Could I get pregnant?

P. S I don't know if it matters but my period was 6 days long on Tuesday.