The problem is that's only a switch so it does not have a DHCP server (to give computers IP address) nor does it support connecting to the modem and sharing the Internet connection amongst computers.

So the problem your having is that you're trying to get 2 IPs from your ISP and they definitely won't do that.

Depending on your modem, it may have a router mode which you could setup. Then you could plug the switch into the modem and both computers into the switch which should give you Internet access on both.