So if both modules are custom, I'll presume you are writing them both. You have a couple of options. The most important thing is you need to get the tabid that holds the module you are looking for. You may know the tabid, but you probably only know the tab name. If that's the case, you can get the tabid of the remote module by using:
Dim ctlTabs As New DotNetNuke.Entities.Tabs.TabController
Dim objTabs As DotNetNuke.Entities.Tabs.TabInfo = ctlTabs.GetTabByName("TabName", PortalId)
Dim RemoteTabID = objTabs.TabID
'Get ArrayList of Modules on that tab
Dim aryRemoteModules = objTabs.Modules
I don't know if you need that arraylist of the modules on your remote tab, but in case you can use it, I thought you'd like to know it's there. Regardless, the next thing you want to get is the modules on that tab. You can do it in many ways. If it were me, I would probably write something in my module that does the look up. You should know the module definition id of the remote module, but again, if necessary, you can look that up as well.
Ulimately, you're going to end up with a stored procedure that does something like:
SELECT
'remotemoduleid' = m.ModuleID
FROM Modules M
JOIN TabModules T ON t.ModuleID = m.ModuleID
WHERE M.ModuleDefID = @moduledefid
AND t.TabID = @tabid
The only thing I'm concerned about with that procedure is you will need to account for the possibility of having more than one instance of your remote module on the remote page. LMK if that helps.