You need to know a few things before adding or replacing ram.
What frequency clock speeds of the memory is your laptop compatible with. - you can check your laptop's characteristics at it's manufacture site or manual.
What type of ram is your laptop compatible with. (ddr, ddr2,ddr3, etc.) - Some laptops can be compatible with more than one type. Again your laptop's particular details should tell which.
There may be limits to how much ram the laptop (the connectors) can accomodate. (as mentioned above).
You can also check if the memory is still ok by testing the old laptop with it's memory reinstalled and also checking your newer laptop with the original memory. (To help be sure the memory wasn't fried by static electricity. ) Once you've found out what memory types and frequencies your newer laptop is compatible with, you can usually find plenty of replacements available by searching on amazon. (You can also search by typing "memory upgrade for <your laptop model name>" in the amazon search)