The Pentium 4 is a radically different design from the Pentium 2, and you need a motherboard designed for the Pentium 4. Not to mention all new RAM to go with it.

If you were given a Pentium 4 system, then the easiest thing to do would be to put the CD-RW drive in it instead of trying to put the P4 chip in the other system. If you were just given the chip, then it's pretty much useless to you without at least a new motherboard and RAM.