The HP website includes XP as a supported operating system for your printer:
http://h10025.www1.hp.com/ewfrf/wc/softwareCategory?os=228&lc=en&cc=uk&dlc=en&sw_lang=&product=5295967#N247
However it's not clearly from your post exactly which program is incompatible with your operating system. You don't need much of the software that comes with printers these days. As long as the drivers work you can simply use alternative software. For example, if I want to scan something I simply open Photoshop and scan into that program. (Free software, such as GIMP would work just as well). I don't use the program that came with the printer.
Either try downloading and installing the
basic driver (from my link) or use the CD-ROM but look for a 'custom install' option and then install just the driver(s). The printer should then work. If there's more stuff on the CD that you think you might actually need, use 'custom install' again and try to install just one item at a time. Repeat as necessary.