why did I have two periods this month?

Lian
I had my period last week, from Mon-fri, and on that Friday, I had unprotected sex, but I took the Plan B that same day. I had more unprotected sex for two more days. Yesterday was Wednesday, and I started my period im guessing again. Why is this happening?