ok ruudra so yopu say that you know how to get the connection going for XP (i assume you mean using Internet connection sharing) so what you need is to do the same thing under linux.
To do this you will need a firewall. One of the most common uses for a firewall is to share an Internet connection using network address translation (NAT). There is a special type of NAT that does just what you need called masquerading. basically the way it works is system 2 will make a request for something outside your network (so on the internet for example) and that request will go to your default gateway (which you would have set to system 1). System 1 will get the request, re-write it before sending it out to make it look like it had sent the request. When the reply comes back system 1 will look up who sent the request in the first place and re-write the packet again so that it goes back to system 2 looking like it has come from the internet directly.
It is quite neat really. Anyway there are a variety of pre-made firewalls you can load up and try or if your feeling game check out the netfilter homepage
let us know how you go