Our app Selly can help you to upsell products based on variants.
In upsell offer setting, you can select the condition with prefix “Variant”:
When customers add A to cart, they are prompted to add Product B:
The app interface is customizable and the app support is ready to help:

