Here's how: 

1. If A is using UPI, then they can enter B's UPI id. And ask B to approve it at their end. 

2. Otherwise, the obvious way is to A to share their password with B and change their pwd after the checkout is done. 

3. You could also generate a payment link for A - using the subscription renewal form (New membership). Just make sure to choose Payment Gateway as the payment method. A can then share the payment link SMS with B.