Not exactly sure - but you could have datasets of key words and if those words match then you choose the search engine. And maybe there's some learning over time...
Maybe you can find a way to rank the individual search results. Some kind of text search, and compare these results. Then, whichever site search engines results gets the highest score can be displayed first.
Or, you can return individual results from different search engines on the same page.