flatmate was flirting/hooking up with me and my bestfriend, and we only recently found out

So i just finished my first year of university. In my flat ive become super close with 4 girls, one in particular. I also was very close with one guy. This guy and I got together multiple times during freshers week and always had a flirty friendship. At the end of February, after a club night it rekindled and we ended up hooking up. Nothing else happened after this however our texts and irl was very flirty for the remainder of the year (from my pov anyway) so much so that when my home friends came to visit they where like woah that guy is flirrtingggg, and they arent the type to just say that.

This leads me to the end of the year, just before we all leave for summer. During a girls night she excitedly tells us that her and this boy have been properly seeing eachother since beginning of february (before me and him hooked up). She expressed how she felt awful telling me because of me and him during freshers week and wanted to make sure that it was okay by me (she didnt know any more than freshers week and i dont hold anything against her for persuing him). Ofcourse i knew straight away that there was overlap, and knowing that she had been cheated on in past relationships this immediately rang alarm bells, on her behalf but also acknowledging that this connection i thought i had with him either was fake or imagined, or he was an extremely good manipulator.

After about a week at home i summoned up the courage to tell her, which i question if it was the right decision every day as it understandably brought her to tears and being over the phone and half the country away from eachother was not nice. I actually think him and her are really perfect for eachother (if i look at him on the viewpoint i did before he did this), and i am overall so happy for her.

Theyre now seeing eachother alot over summer and its seeming to become clear that when i go back to uni in september they will probably be dating. Living in the same house as the girl and being friends with all of his housemates its giving me an extreme amount of anxiety about the year ahead. I value my friendship with this girl so much and it really scares me to think of this getting in the way of our relationship. She told me initially after it happened that the guy firstly denied everything saying that "--(me)is a fucking lier", obviously i had reciepts so when she told him that he admitted it. But it scares me to think of what lies hes said to get her to trusting him again.

Idk i think i just need some outside perspectives on the matter,

anything would be really helpful xxx