You're basically setting up a two-step DNS resolver, which queries two upstream servers and returns a single result based on both answers. I'm not sure whether there's a general way to do this, but it isn't hard to script if you have a good DNS library. Sadly, most programming languages these days don't come with that (at least, not the server side) - but fortunately for us all, Pike does :)
But if you're going to mess with DNS, you're going to have to decide how you handle all types of lookups, not just A/AAAA records. The simplest way would be to pick one of your upstreams as the primary (probably OpenDNS) and use that response unchanged.
The code would look something like this simple DNS logger:
https://github.com/Rosuav/Hogan/blob/master/dnslog.pike