Both computers should be connecting to the router.
from the sounds of it you're using a wireless adapter to connect ad-hoc to the laptop, so the laptop is actually using the computer for a access point, which in turn uses the router for internet access.