On modern network cards, this should just work.
It is advisable to give each laptop its own fixed IP address, such as 192.168.1.1 and 192.168.1.2 (with a netmask of 255.255.255.0)
However, you need to define what you expect to work. The first thing to try is ping the other machine from the command prompt, e.g.:
C:\> ping 192.168.1.2
Then, you can try to access shared network drives if you have enabled that. In the file explorer, try typing: \\192.168.1.2