As long as you have your CD key from that machine, and it will work on the version of XP that you wish to install, there is no problem. The legalities of it revolve around you owning your CD key. The disks are all the same and no CD key is tied to any particular disk. You have to ascertain if you have a CD key for XP Home retail, XP Home OEM, XP Home upgrade or the same configuration for XP PRO. If your key does not match the version of your disk then the system will not accept it.
Free downloads of XP do not exist to my knowledge.