you don't need 2 connections to do that, you can do this just with one connection since connection user has access to both databases
You just need to put database name before table name
[database_name].[dbo].[table_name]
Here is how you could do that from your given example:
SELECT a.col FROM [DB1].[dbo].[table1] a
INNER JOIN [DB2].[dbo].[table] b ON a.col = b.col