If the databases are located in the same SQL Server instance and the credentials you use have access to both databases, then you can simply define the tables using multi-part identifier. Something like
SELECT *
FROM DBO1.dbo.Names a
INNER JOIN DBO2.dbo.Worker b ON a.NameID = b.NameID;
If you need to access another instance of SQL Server, linked server would be the easiest solution but of that's not possible, then you can perhaps use
OPENROWSET[
^]. Something like
SELECT *
FROM DBO1.dbo.Names a
INNER JOIN OPENROWSET('SQLNCLI',
'Server=AnotherServer;Trusted_Connection=yes;',
'SELECT NameID, Name
FROM DBO2.dbo.Worker') b
ON a.NameID = b.NameID;