>How can I unpartition drive D (without commercial software), format drive C and install XP again?
Insert your XP CD (works with complete and upgrade version) and reboot the computer making sure you are booting from the CD. When it asks what you want to do, do a complete / full install. Don't accept the defaults and look for the option to partition your HD. If I understand correctly what you want, you have to delete both partitions and create a new one.
Alex