am I in the wrong? slept with guy I like best friend

Samantha
 in November/December 2016 I met this guy(M). I liked him a lot we tlked a lot and ft. I invited him over and We chilled n had a great time. Pretty much I gave him the 😻😂😂. Soo after that he stopped texting me around the end of December n I'm like😤😒 feeling some type of way thinking he obviously doesn't like me anymore nor interested in me this goes on till February 2017 he hits me up with the Heyy big head txts and we dry txt each other. I was still mad since he stopped talking to me for about 2 months he said cuzz he works a lot n didn't have a phone n I'm like😑. So I gave him a chance gave him my number again but he never hit me back up. But in February I met someone else I was really really into. I invited him(K) over we chilled n had sex n condom broke. K was gonna buy me the pill but since I went home I couldn't take it. K was still there being supportive and was even tlkin bout being together. So for me since finding out I might be pregnant I told him bout my sexcapdes. He was like no judgement here's mine. So we go to the obgyn n asked bout my conception period. She said the 8th-10th, Soo when we got home I told K it wasn't his n Ik who it was since i only slept with one other person tht month. Everything added up K was cool with it n is still trying to help through it all. He told me he likes me a lot n I like him a lot to like wanna date him. So fast forward to now my roommate n I wanted to do a double date. So I hit up K asking if he had friend for my roommate he tells me his friends name telling that's his bro n I'm like hmmm 🤔seems familiar then he sends me a pic of him to show her n in like omg😭😱. It was M n I told K I think Ik ur friend n he said how n I'm like😰. So I told him the honest truth n he got mad at me n I'm like the fuck I hadn't seen M since December. I also told M n he got mad too im like the fuck Idk y'all even knew each other. So either way I apologized to both bout the situation even happening but I made it apparent that Idk they even knew each other n I told K I really like him n I don't want this to mess up Wht we had going on. Apparently M told K I slept with him 2 weeks before I slept with K which wasn't true I haven't seen that man since December plus I was on my period then😑. Anyway am In the wrong.