the amount of system ram does not effect rendering power of a graphics card, just how much it can render. having more ram doesnt give you better framerate. if u want to fix this so u have better frames, get a dedicated graphics card of decent quality, probably in the $170-$250 range. also your friend's gt 640 isnt terrible for games, while not the greatest, it still beats an onboard graphics engine on frame rates. also, if your friend has a quad core cpu, that would beat a dual core cpu (what you have) even if you had a higher clock speed. also, amd's clock speed and intel's clock speeds are not comparable because Intel chips get more calculations per clock than amd chips.
also, if your friend has a lower resolution monitor than you do (say he has a 1280x720 screen and you have a 1920x1080 screen) then of course its going to run smoother because the graphics engine isnt doing as much work!
it sounds like you need to get a grasp on some fundamentals of computers. get a new graphics card, and do some research before buying. understand what bit rate, vram amount, and cuda core count/stream processor count effect in a card, and look for a deal. also understand what a high end's cards power requirements are and maybe get a new power supply when u get it. i hope this was a start in the right direction, good luck!