Hi teash
As long as your friend has the Windows XP license key, normally stuck to the side of the PC case, and you are both running windows XP then you should be able to use your CD in his machine.
If you are doing a complete reinstall (including format) then you shouldn't run into any problems.
They`re not made by the same manufacturer
What manufacturer are you and your friend running?