Changing Mac Book Pro 2012 admin Password

Solution 1:

You need to wipe the machine & start afresh.

Currently, everything on the machine belongs to the previous owner - including the OS itself. Eventually you will need their Apple ID & password before you can update things.

Additionally - you have no idea what spyware, keyloggers etc they may have put on it. The chances may be low but they are not impossible.

See Apple KB - What to do before you sell, give away, or trade in your Mac The previous owner should have done the first 5 steps; you'll have to start from step 6.