I have a 2 partitions. One with XP and one with Vista. XP is set as the
active partition. Is it okay to format the XP partition from Vista? Or will
that mess up everything?
That will depend on which version went on last and why you need to reformat the XP primary. If you added Vista after XP was already on you most likely will have to plan reinstalling Vista to see XP added into it's newer boot loader. The efforts to add XP in with Vista here have shown the tool known as EasyBCD(excellent tool) and the use of the BCD editor have not worked when XP was either reinstalled or installed fresh.
XP will go back on without problems while being isolated and the need to use Vista's automatic repair tool for startup problems might see XP added in that way. There you boot from the Vista installation disk and look at the bottom of the install now screen for the repair tools button. There's only a few articles so far to find on adding XP into an existing Vista mbr. one is seen at http://apcmag.com/5485/dualbooting_vista_and_xp
You can't format the partition with the master boot record, if you do that, the other operating system would be unbootable. I really think you should backup and then start afresh, its really risky doing this sort of thing.
With the primary drive here strictly used for XP Home I went to install Vista on the second drive to it with XP Pro there. It refused to install to the second partition forcing XP Pro onto the first sata drive. The EasyBCD(original tool) was used after the VistaBootPRO(copycat apparently) and BCD editor to try and add the reinstall of XP Pro into the Vista mbr and boot loader after. Nothing worked. Vista had to be reinstalled being the newer version. None of the steps outlined in the article there or in others actually saw results. Vista then saw a third install there.