Personally, I wouldn't get an 8-year old MacBook especially if you want it should last another 4-5-years. Also, RAM and the graphics card cannot be upgraded.
But if you still want to, the one thing you want to check out is the Cycle Count in the 'Power' section of the System Report.
This will...