Hi,
Here is a simple way, without any mass action or coding:
- create a product with one characteristic with one value (and thus one variant) and select the group B in the "user group after purchase" of that product
- add that option as option of your main product, where you will select the group A in the "user group after purchase".
That way, you'll get a mandatory option to your product which will add the second user group.
Also, you can use CSS to hide the option selector on the product page if you don't want to have it displayed on the product page.
An alternative would be to create a user group C which would have all the rights of group A and group B. In that case, you could simply select group C in your product and be done with it.
Changing the radios to checkboxes could be possible, but it would require also modifying the code of the user group after purchase plugin to support several groups which isn't the case now. So you would need a developer to help you with that.