You can only have one root when searching. So either you'll have to perform two searches, one in each container, or you can define your search root higher up in the directory.
The decision depends on how your directory is structured. If you really want to allow users only from these two containers, then you need to perform two authentication attempts, one for the first container and one for the second container. However, if you only have users in those two containers, you can set the root higher up in the structure, to cover both containers - with a little performance penalty.
Which path to choose depends on what your requirements are. But in your case, I'd guess that you should setup a "fallback" authentication attempt on the second container.
If this post was useful to you, please mark it as answer. Thank you!