You just bought a new iMac planning to load Windows XP Home with service pack two onto it using Bootcamp. A copy of Windows you bought through Amazon turned out being an OEM version that failed to install on two attempts. You want to load Windows XP as all of your software you want to continue using is written for it.
You partitioned a hard drive and restarted your iMac with a disk in place. In two attempts, you reached a point where Windows was starting to install when it stopped that installation. Please follow instructions from a how to install Windows Xp on Macbook or Mac using Boot Camp.
Make sure you partition your hard drive for use with Windows XP before you try to install it or it will fail. A default value of Boot Camp partition size for XP is 5 Gigabytes, but you can change that. Also, you will need to select a correct partition you made for your Windows XP install.
It is recommended to perform a full format on your XP patition using a FAT file system. I think what you need then is a full retail version of Windows XP or if you have an older version of Windows ie. Windows 2000 then you could buy just a retail upgrade version of XP. A retail version won't be hardware manufacture specific.
It is up to you what retail version of XP you get ie. home, professional, media centre edition, etc. Coincidentally, some one bought a Microsoft Windows XP Home Edition Full Version with SP2 from Amazon and was able to successfully install it on an Apple machine using Boot Camp. You can obtain Windows XP retail versions from Ebay.
Also, many online retailers still carry Windows XP retail verson.