You might want to look at the D2RQ project. You can expose your two relational database with that middle-ware. Quoting the D2RQ page, D2RQ allows to:
- create custom dumps of the database in RDF formats for loading into an RDF store
- query a non-RDF database using SPARQL
This should work for you if your databases are not terribly big and it is a good approach if your databases are frequently updated. If you need to run queries accessing both databases you can use SPARQL query federation. Very easy with Jena/ARQ.
If your data is static or does not get updated too often. You can get better scalability by dumping the RDF triples and assert them into a native triple store (Jena/TDB, 4store, Virtuoso). With any of these triple stores stores you can use SPARQL to access the data.