(1) Make sure that the cable you are using is a Cross cable
(Note: Some Network Adapters can work with both straight and cross)
(2) In XP pc go to control panel-> Network connections -> Right click on your network adapter and click on properties.
(3) In the window that appear, in general tab, double click on Internet Protocol (TCP/IP)
(4) In the window that appear, choose 'Use the following IP adress' then give the following,
IP addres 192.168.1.1
Netmask 255.255.255.0
(5) Use the same steps to find the network adapter in Windows7 Laptop.
Then in Internet Protocol options give
IP addres 192.168.1.2
Netmask 255.255.255.0
Now your connection is logically ok, if there's no physical problem( wrong cable etc) this should work.
Try pinging from one machine to another, if not working, maybe you have may need to disable windows firewall and your virus guard firewall..