You will first have to buy an equivalent version. If they're already using XP Home, then just buy XP Home. If they're using XP Pro, then you have to figure out if they're using a volume license version, oem version, or retail version. Then you have to buy the right version license. (If it's volume license, you're out of luck: complete reinstall required.)
Once you have this, log in with the administrators account. In the registry, navigate to HK_LOCAL_MACHINE -> Software -> Microsoft -> WindowsNT -> Current Version -> WPAEvents. Right click on OOBETimer and select "Modify". Change any of the values in there, and close the registry.
Next, go to Start->Run and type "c:\windows\system32\oobe\msoobe.exe /a" without the quotes. Click to register by phone, and on the next page click the button to change your Key (or license, my memory gets hazy at this point). Enter in your new LEGAL license key, and click Next. It should generate a new system id. Cancel out of the screen, reboot, and you should be able to do legal things like get updates from Windows Update without running into WGA blocks.