Sorry to tell you, but you can't just "fill the hole" left from losing people for some friends.. Some friends hold on to that, and won't let go. And that's what makes it hard to fill the hole. Although it seems you've been an amazing friend to A, it seems she never really wanted to let go of B. So, all this time she has probably missed B and wanted her to come back deep down inside. If B is a b***h, let her be a b***h. Don't let her get to you. I wouldn't be worried either unless you find A is telling B stuff you wouldn't want her to know or starts to act real indifferent.
And yes, people have been friends with others who hurt me. And honestly, I really didn't give a ********. I kept my friendship with that person, until they decided they didn't want to be friends with me anymore and would rather be friends with the person that hurt me. It kinda made me feel like s**t, but I just thought that if they wanted the person that treated me like s**t after all, then so be it. Because them treating me like s**t has nothing to do with their friendship and showed me just how much they cared about me. You would think a friend wouldn't tolerate being friends with someone who treated you like s**t, but in your case A was friends with B first, so of course she was going to chose to rekindle the relationship she had with B. Friends come and go, even best friends that you've known for years. Sad, I know. But true. You can always make new friends though, and become really close with someone without having to know them for years.