The way to share the connection so that both can use it at the same time is some form of networking.
At its simplest that would be a crossover cable connection between the two machines.
Machine one would connect to the modem via USB or ethernet. Machine two connects to machine one by ethernet.
This will mean one network card in machine two and either one or two in machine one depending on whether the connection to the modem is by ethernet or USB.