The order in which you do things is important. You need to be sure to load Win2K first and then XP, otherwise you may have problems later on.
1. Start with a clean, unpartitioned hard drive.
2. Install Windows 2000, creating your first partition during the installation. Be sure to specify NTFS as the file system.
3. Boot up to your Win2K partition at least once to make sure your install worked OK and you don't have any additional drivers or anything that need to be installed.
4. Shut down your system, insert your XP CD and boot to it (assuming you have a system that will boot to a CD). Do your XP install and create your next partition at this time (also NTFS of course).
5. After XP is installed, you should have both Windows 2000 and Windows XP as options on your startup menu. From this point forward, you can create and format your other partitions from either operating system and both operating systems will see them.
Remember, however, that any application software will need to be installed in both operating systems. If you want to use the same program folders from both operating systems, you can install the programs to a third partition. Then, for each operating system, select the same folder locations on thethird partition for the installation. I have heard that this works, but to be honest with you, I've always found that if you have the hard drive space (which you probably do with a 40GB HD), it's better to do separate installs for the applications.Hope this helps!