Both machines have no real IP.
No IP address?!? You can't route IP packets without an address. Do they really not have IP addresses? Or are those addresses not routable across the WAN. Or is it that the machines firewalled?
Is there a common machine (or series of machines) that can transfer data to either machine:
machineA <-> machineX <-> machineB
Or a series of boxes:
machineA <-> machineX <-> machineY <-> machineB
If you can find a machine both can talk to you can
setup a tunnel.