You must keep a primary partition for xp and, perhaps, a small "boot" partition for the bootloader. Linux can be in logical partitions, within an extended partition.
It would be easier to use the livecd to make any resizing operations.
I think you can install xp first, using not the entire disk space but just the partition size you want for the system (20-25GiB would be enough for the system only+software, without data files). Linux partitions can usually be created by the installers themselves for each distro, but you have to select a manual partitioning install, not an automatic one that could just take all the free space or even the entire disk.
There is a documentation link on the top of the page:
http://gparted.sourceforge.net/documentation.php
Be careful, partition work is always "dangerous", even for professionals.
Before going on, you need to learn things about partitions. So, you can read the Wikipedia related articles and others, like:
http://www.cyberciti.biz/tips/the-impor … tions.html
http://www.pixellany.com/partition.html
(Topic moved to the live media section).
*** It is highly recommended to backup any important files before doing resize/move operations. ***