You can use the drive in the new computer, but you would need to reinstall Windows XP to run as a dual boot system and then reinstall the program. Otherwise, you could try and install the game onto your Windows 10 install.
You'll need to install it onto the Win 10 system, until that's done Win 10 won't know its there.
Expect some compatibility issues, it MAY go in just fine and run OK, but it's more than likely you'll be reaching for the compatibility settings and may need to run the game as Administrator.
You can use the drive in the new computer, but you would need to reinstall Windows XP to run as a dual boot system and then reinstall the program. Otherwise, you could try and install the game onto your Windows 10 install.