Plan b work ??

I had sex a few hours ago. It’s been about 5 hours since he finished inside me, will the plan b still be highly effective if I take it now ? I also jut finish my period yesterday rn I’m just spotting.

My doctor switched my bc pills because it was giving me hbp. So it’s Been about 1week since I stopped taking But Im supposed to start the new one until Sunday, and I guess he forgot or something