Not all laptops are upgradeable there maybe limits on RAM size, CPU upgrade is a minefield unless you know of someone who has done it before with that particular model (Which Toshiba is it?)
My generic answer to this would be:
RAM - SSD - Ubuntu job done!