Definitely. The memory between your two HP-branded PCs can be changed around. If you're looking at upgrading the systems, you can just buy some DDR400/PC3200 memory. I think it is more confusing as they are listed as "non-ECC", and "SDRAM", but both systems take the same DDR400/PC3200 standard.
As always, just be careful when installing memory, and make sure the pins line up when installing it. If you run into any problems, feel free to shoot me an e-mail, or submit another question.