I presume you are using ethernet?
You can network them easy enough, just TCP/IP. Give them the same subnet mask, and IP addresses which are different by 1.
Getting them to actually talk to each other is trickier. You are going to have to install some extra software on one, the other or both. OS 9 doesn't run SMB/CIFS and XP doesn't run Appletalk. Neither run AFP. FTP might be your best bet. Should be able to do that with freeware.