You could make an image of your XP partition and copy it to the other drive. You could also copy the partition. you could experience trouble because you are using an operating system that comes out of another computer (other hardware etc) when placing it in your compaq.
You can use Ghost or Drive Image to make an image of the XP partition and copy it to the compaq drive.
Or use Partition Magic or Acronis' partition program to copy the entire partition.
Then place the HD in the Compaq and hope it works