Memory is easy. Goto Crucial key in what PC or what motherboard you have and they will tell you what you have and what you can update to click here. If you don't know what motherboard you have you can download SIW or Belarc or Everest, you can do a google search for them if you need them. Alternatively just let the Crucial website scan your computer. They also do graphics cards.
The graphics cards upgrade can be troublesome. There seem to be more and more postings in the helproom from people who have problem with this.
The card you have now must be AGP so you need an AGP card. The 5200 only needs the power you can get from the AGP slot. Newer cards also have a power connector and this is where the problems can start.
If your power supply is not up to it it might not supply enough power to the new graphics card so depending on what you have you may need a new power supply as well. If you look inside your case at the power supply there will be a label on it which tells you the wattage of what you have.
As well as this you have to decide a budget, you can get something like a 7600GS or a 6600GT and either will be a considerable advance on what you have already but both need power. They cost about £80-90.
Also I think I should mention that if your processor isn't a reasonable speed its a waste of money and you haven't said how fast your PC is.