@Ashkahn
I was not aware that Windows 7 came on a CD; only on a DVD. So if it is actually a CD, that is probably a Repair CD and that can not be used to install Windows.
Your model laptop probably does not support UEFI, so the mode is probably set to BIOS/MBR -- and that should work just fine with Windows 7 install USB, unless you went to the trouble to create boot media that requires UEFI.
Booting from DVD should work without issue, it's just going to take a LONG time to get to the installation screen where you select the drive to do the installation -- possibly a few minutes -- and the screen is likely to be black the entire time.
Since the system is freezing, that implies a hardware issue, so next time you boot, press the Esc key repeatedly until the HP Startup Menu appears and then select the option to run diagnostics -- usually F2.
***If my post helped, click the White
thumbs-up symbol to say thanks***
***Please mark
Accept As Solution if my post solved your problem***
I am a volunteer and I do not work for, nor represent, HP