Set up the network info in both machines the same.
Workgroup EXACTLY same name, best typed in with caps lock on to ensure full compatibility.
IP addresses same first 3 bytes and different 4 byte, eg 192.168.0.1 and 192.168.0.3.
Subnet mask the EXACT same, eg 255.255.255.0
Network cards set to the same speed eg 100 mbps full-duplex.
Share Files and Printer activated in the Network configuration. Both with Windows Logon service.
Win XP must have a user account for the other PC that is the same name as the Win 98 PC or the user that is active on it and the same password.
A folder must be shared on both PCs.
The XP machine usually needs to have SAP Agent (Service Advertising Protocol) activated in the 'services'.
That should do it.