I think you need to tell A that sharing this feedback with you won't help B change, and that they need to address B directly or talk to their supervisor.
You can also say that sharing this feedback with you is putting you in an uncomfortable position, as you are friends with both of them, and you need it to stop. It's perfectly okay to validate A's complaints ("I understand why you feel the way you do") so that A doesn't feel like you are dismissing them. But that doesn't mean you have to be in the middle.
Having spent many years in corporate life, I can tell you that one of the biggest blockers to people improving is that no one tells them there is a problem to begin with. Person B may have no idea they're underperforming. And to be fair, I can't tell from this whether their supervisor would even agree that B is underperforming; B may be doing just fine from management's perspective, in which case A needs to let it go.
Good luck!
Fair enough. Sounds like A is going to have to decide whether they talk to B directly, complain to the supervisor that B still isn't meeting expectations, or drop it. But keeping you in the middle isn't going to solve the problem and it needs to stop. You can say that firmly but nicely and with validation. (The validation is important to maintaining your relationship with A.)
At the end of the day, this sounds like a failure at the management level. If B is known to be underperforming, it's on management to either find a way to help B improve or replace B. Management's failure here is hurting all 3 of you. A has a right to be pissed. B needs guidance or the boot. And you need to be free of this mess.