Wa'alaykumussalaam
As I understand it, in Islam it's not permissible for male and female who are non mahrams to be friends because friends usually communicate and meet each other regularly, online or in person.
You can search Islamqa.info about this. I include the link that shows many ways male and female non mahrams friendships fall into shaytan trap.
Also B is badmouthing A, and backbiting that B does is not permissible, because she is doing it to ruin A's marriage and B is being arrogant because her family financial situation is better than A's.
That said, A's husband is also not supposed to maintain this friendship for the reasons mentioned above.
Whatever happens between A and him, is to be solved between the two and if needed, involve their families. B is not supposed to get in between, nor allowed to get in between them.
https://islamqa.info/en/answers/1200...-men-and-women