Love triangle

Hi I just need some help. I'm freaking out so just give me what you can about the situation.

I am currently trying to make things work with my ex of 6 years we broke up for about 1.5 years and I was seeing someone else. We recently decided to fix it so I broke it off with person b, but now that we've been seeing each other and spending time I realized that I miss person b but only sexually because my ex doesn't cut it. Also person b keeps popping up at my house. I'm so confused on what to do. Help please.