While you can query multiple classes from a same query (using graphql alias), they are independent from each other.
Meaning, you cannot search for one query in both classes and have mixed results. You will end up with two different set of results, each for one class.