It depends which version of XP it is.
There is of course Home and Professional versions of XP.
But there are also OEM versions, retail versions, exterprise versions, developer versions and so on.
So YOUR key is for the version of XP you had on your computer, if your friends versions is a different version YOUR key wont work with it.
Assuming you bought this PC from a legitimate company with XP pre-installed then the company should be able to supply you with a XP restore disk that will re-install using your valid key.
Contact them and ask.
(Have you checked the software that came with the PC that a XP restore CD is not inlcuded?)