...so i don't know if the CD Rom is functional or not. .
Optical drives get filthy and can stop responding, but are otherwise OK.
I used an inexpensive drive-cleaning disk on three early Macbook Pros whose optical drives had been pronounced dead and requiring replacement by Apple Authorized Service Providers at a cost in the early 2000's of about US$150 parts and labor.
I know the optical drives were still working in two of them when their owners finally retired the computers, because I helped them prep for recycling.
At a cost of US$5-15, the cleaning disks are a cheap fix if it works and, if it doesn't fix the PB, can be used on other devices with optical drives like older car stereos and DVD players.
I'd hold off on adding RAM until you know the thing is going to work. My usual RAM vendor—Other World Computing— no longer lists RAM for that model, and a search showed few sources for those odd modules: