Try this:
SELECT a.userID, b.usersFirstName, b.usersLastName FROM databaseA.dbo.TableA a inner join database B.dbo.TableB b ON a.userID=b.userID
You can't do that on fly directly. You have two options:
1. Create a linked server in DB invironment, then create a SP to take care of it.
2. Get two DataSets for them, then merge two datatables into one based on usersID.
If this solves your issue kindly up vote and mark this as solution.. Thanks..