<human>: Could you distill the essence of the text into 1-3 sentences?

Me and my buddy (Jim) have been best friends for a very long time. He started to have feelings for our mutual friend (lets just say Mary) around a year ago but she didn't feel the same way. They talked it out, and they were done with it from what I know, still hanging out but never going back to that aspect of their friendship. Soon after, Mary and I started to hang out consistently and I started developing pretty serious feelings for her. We have amazing chemistry and I know it could work if we got together. I never voiced my feelings for her to anyone, but I feel like she might be sending me IOI's and could be interested (especially after going to bars, eek). I still feel weary about coming out with my feelings for a couple reasons.. I dont want to risk losing both of them as friends, and the details are sketchy over what happened with Mary and Jim. They're still good friends, and talk often. Jim recently confided that he still did feel for Mary, which kinda throws the whole wrench in everything. I don't wanna cross him as he's a very good friend of mine and it would cause major drama within or friends group, but I also do care about this girl and she's a light in my life right now. I'm starting to get frustrated over the whole situation and I don't know what to do. I just wanna somehow be with her without destroying everything in my path. What should I do, Reddit?
<bot>: My friend and I are pining over the same girl. He has history with her, I don't. I wanna somehow be with her without ruining our friendships.