Both help the speed of your laptop! Here's why.
If you upgrade the Processor, that will make your computer faster. RAM is where programs are stored while they are being used. The more RAM you have, the more programs you can run at once. The only way to make your computer faster is to remove all those nasty viruses or upgrade the processor.
So a summary of this would be;
Ram - Support's and powers the Processor
Processor - Makes the computer function.
Hope I helped. :-)