How to combine taxonomy terms?
Do you always need to search on multiple terms at the same time? And how do you want to search, via an exposed filter or with query parameters?

In both cases you need to add references to the vocabularies A and B. 

If you want to search through an exposed filter, you can add the term name fields (with relation to the references) to the normal filter and just expose them. I'm not sure, but I think there is a way to combine this with global text search.

If you want to work with query parameters you need contextual filters. Just add a term name for both vocabularies and let them match the value of the query parameters. You can specify what results must be shown if the parameter value is 'all' for example.

I don't think you need the or operator because you mentioned you want to match on both terms at the same time. However, if you want to match on multiple combinations you might want to check this module. I haven't tested it myself, but it really saves you some time if it works. The or operator is not native in contextual filters.

Good luck! Contextual filters and references can be a real pain in the ...