Not sure exactly what you mean, Judith. You aren't saying you want both modems to connect at once, are you?
To share an Internet connection, you usually pick one machine to serve up the internet. At that point, you would not use the modem at all in the second machine, you'd use the network card/cable to link to the machine you want to be the machine to serve up the Internet.
Setting up Internet Connection Sharing is pretty simple with Windows XP. With Windows 98 it's not too hard, either. It'd help to know what OS's both machines are running.
Assuming it's Windows XP, and that you have the two PC's networked already, you simply run the 'Set up or change your home/small office network' wizard on both machines, on the machine you want to make dial out you tell the wizard 'This machine connects directly to the Internet, other machines connect to the internet through this computer.' On the second machine, you should pick This computer connects to the Internet through a residential gateway or another computer on my network.'
You can find the wizard I mentioned in your Control Panel, under Network and Internet Connections, just pick 'Setup or change your home/small office network' and follow the above instructions. For the record, it will help if you have the machine that will serve up the Internet finished first. Be sure to have it connected to the Internet when you run the wizard on the second PC, it'll make things happen faster.
One last thing: The wizard will ask you to name your PC's, and your workgroup. Be sure you use the same name for the workgroup on both PC's!
I hope this is the info you need. Good luck with it, and be sure to let me know how it goes!