The only way to use a hub is if there is a router in front of it. A modem will not work. Modems give out single IP addresses and routers give out multiple. A hub is strictly a signal splitter and will not issue IP. Both computers will need their own IP to operate properly. Most routers come with at least 4 ports that can be wired into computers and an input port from the internet.