First off the A1495 is the battery P/N not the system and is from a MacBook Air from (2011-2014) which would be incompatible with your older 17" MacBook Pro 17 A1297. Some parts from within the A1297 are interchangeable (not all). Here's a full listing for reference [https://everymac.com/ultimate-mac-lookup/?search_keywords=A1297|A1297 Systems]
The 17" I bet needs a new battery as it's likely not turning on.
The MacBook Air may also need a new battery just based on its age, but until you repare the OS install (replace the drive?) it would be hard to tell.
If you messed up on the model try using this [https://everymac.com/ultimate-mac-lookup/|EveryMac - Lookup] or just go to the systems listing to scan through [https://everymac.com|EvereyMac]