|What kind of modems are you talking about here? Dialup modems or highspeed internet modems?|
If the latter, you can't do it. If the former, you can't do it unless both are attached to a working phone line. Then you can dial the one from the other. FWIW, transfer raites across dialup modems would be painfully slow.
What you need to do is get yourself a crossover network cable and directly connect the two using it and their network interfaces. Then, give them the following TCP/IP settings:
IP Address: 192.168.0.1
Subnet Mask: 255.255.255.0
Then, they'll be able to communicate and you'll then be able to share a folder on one PC, connect from the other and transfer files that way.
It matters not how straight the gate,
How charged with punishments the scroll,
I am the master of my fate;
I am the captain of my soul.