first thing to do, is there are two types of PIII's a traditional socket, and then a cartirage (looks like a SNES game). they are two differant styles easily destiguated for one another, open your computer, does it look like it will work. if not no need to go farther, then if it will, goto HP's site enter your serial # and model #, to find out what kind of motherboard you have, google the motherboard to see what processors it will support.
also you can look up detailed specs of your processors on intel, use the spec# on the processor at:
intel spec finder