Similarly to this question, you are doing internal transfers:
Transfer
of-26
shares of ATransfer
of20
shares of BTransfer
of100
of USD (on the same Account as A & B)
If you want to visually link these transactions, you can set the same tag on all of them, eg. M&A/A acquired by B