You should also look at the RAM timing and make sure it matches.
The timing number is like 5-5-5-15 or 7-7-7-20 or 9-9-9-27.
This isn't necessary for the RAM to work, but it makes it work better together.
Whether you can use DDR2 or 3 is entirely dependent upon your motherboard.
Also, the RAM timing is important.
It's cheaper and more reliable to buy bundled and matched sticks.