Is this the computer? It has a built-in 16x DVD burner already, but you want to upgrade it to a 20x DVD burner.
After you dissembled the case and take out the drive, you will also need to swap the faceplate on the optical drives (from original to HP) such that it will match with the PC. You may need to get an 80-pin IDE cable in case the original one isn’t sufficient.
As a suggestion, look into upgrading the RAM as well from 512-MB.