Chosen Solution

My laptop would not turn on for months then it finally turned on only to find that some keys on the keyboard won’t work

Well your battery is in need of replacement. I’m suspecting the battery has swelled so its pressing on the keyboard and/or the keyboard cable. Here’s the needed part MacBook Pro 13" Unibody (Mid 2009-Mid 2012) Battery and the guide to put it in MacBook Pro 13" Unibody Mid 2012 Battery Replacement