Hi. If you format your C: drive you'll remove the boot loader and Windows XP won't start. But you can fix it by starting the Windows XP installation from the CD and canceling it at the first restart.
It's not possible to merge your two partitions without having to reinstall XP. Your Windows XP is installed in your D: drive, if you merge them, you'll only have C: and all registry entries pointing to D: will no longer be valid, thus Windows won't work.
Anyways, I don't recommend using programs such as Partition Magic, they can cause trouble.
In your case, I'd backup my stuff, restart with the Windows XP CD, remove and recreate the partitions from there, and install XP. That way you'll have a nice and clean installation