No problem, BUT both your (external) modems MUST support leased line (fixed line or similar terminology). There is no possibility to use modems that can only do dial-up connections. You also should have fully wired rs232 connectors, configure the ports / applications to use full modem signals (hardware RTS/CTS flow control, never software x-on/x-off)and set fixed baud rate.
You should consult your modem documentation for the modem configuration & parameters(possibly send out hayes commands yourself)
Connect the two computers using application programs or using ms "direct cable connection".
Oh, and the two ethernet cards and a cross cable are cheaper, faster, more secure and preferable as long as the distance between your systems is limited.