Is it an OEM copy of XP (the product code is on a label stuck to the PC)
Or a Retail copy (the Product code is with the documentation).
If it's the former it should not be transferred to a new PC, as this would be against the licence terms.
A retail copy may be freely transferred - as long as it's not on more than one PC at a time.
You may, of course, try it and see what happens. I take it you do have the original XP CD.