This is not supported by Firebird. So you have to do it at the client code - ie query the databases for data using different connections and combine resultsets into some memory dataset.
If you would upgrade to Firebird 2.5 you could use the EXECUTE STATEMENT ... ON EXTERNAL [DATA SOURCE] statement to do the work at server side, ie in an selectable stored procedure.