Trying to restore Macbook Pro to factory setting, but it freezes when inserted the DVD
I think that the problem is your new ram. You have upgraded with 1333MHz DDR3, and you should use 1066MHz DDR3 RAM. The problem is that the chipset does not downclock your ram to 1066MHz and when MacOS enters graphic mode, the machine freezes.

The problem lies somewhere within the low performance (shared memory) graphic chip MacOS drivers. Under text mode, MacOS works perfectly. Running Apple Hardware Test and testing ram (1333MHz) also works. I have been told that Windows runs also.

If you cannot replace your new ram (it's was hard for me to find 1066MHz 4GB SO-DIMMs), you can temporary fix this problem by inserting one slow (1066MHz) DIMM (if you still have it) and one of the new 1333MHz. This will make chipset run your MBP with the least common speed, and your notebook will boot.

I have found and published a way to downclock your ram and fix this issue in this Apple Support Discusions thread. I'm quoting myself:


  It's possible with a software Thaiphoon Burner (http://www.softnology.biz/) to modify the SPD EPROM (a small non volatile flash, located on the memory, containing information about it) IF the EPROM is not protected (http://www.softnology.biz/tips_pswprotection.html).


If you decide to take this path of flashing the SPD EPROM of your RAM, I could expand this or make a new one question, to cover in details the flash process.