First of all, does that version of Windows XP offer you a license to run on that other computer? Most versions of XP sold are OEM versions, and it's illegal to transfer them to another PC.
Then, apart from the legal aspects, there's the technical side. It's quite likely it won't run without doing a fresh install. Than you can format the disk and get rid of Ubuntu that way.

Assuming it's legal, and assuming it works, you would have to go into Ubuntu's bootmanager and tell it to default to XP in stead of asking.