So you want all members of group B to be added to group A, and you want all places where group B is used to use group A instead?
Dump group B with '/show-object'. The output will have all members of the group.
Get the first ~100 members and call '/set-group' for group A with members.add[] in the body and the selected members. Adding a member which is already in the group does nothing, so this will add all the members of B which aren't already in A to A.
Repeat for the next ~100 members until you're done.
In SmartConsole, run a Where Used on group B, hit the Replace button in the window, pick group A, and select the places where you want to replace it. If there's anywhere which can't be automatically replaced, you'll have to handle it manually.