Well, the problem is most likely hardware, but I seriously doubt it is the CD-RW drive. What operating system are you running?
If you are running 2k or XP you can stop the PC from rebooting automatically by right-clicking on My Computer and going into properties. Goto the advanced tab and then click on the start-up and recovery tab. Under System failure, uncheck Automatically reboot.
As for a solution to this problem, try removing the recently added RAM and then try burning the CD again and see if you are getting the same results.