No a bank account can only be associated with one subsidiary and a transaction only with 1 subsidiary. So the transaction and bank account must be in the same subsidiary to be able to post together
You could setup a bank account called “Intercompany clearing” or something and apply the payment there. Then use an adv Intercompany JE to move it to subsidiary B