You should make sure that you bought the same version of windows xp (home edition, professional, etc) from the one that's already on your laptop. If you did, then you should be able to enter your new key/serial number to make it work.
If you did not buy the same version or can't have it work, you should try putting all your important files and documents in a usb drive or burn it on a cd or dvd. Then, you could format your hard drive with the windows xp cd and install a fresh copy of windows with your new key.
I hope this helps!