Put in the XP disk, run the setup, do not format the drive, and specify a different directory for the setup than default. You will also need to do some other steps to get it working or the PC wont boot, read here http://support.microsoft.com/kb/919529
The best way to do this is to install XP first, then Windows 7.