Personally, I wouldn't bother. CS5 is a VERY old product and is not intended to run on the newer OS, which is what your MBP came with. I had to uninstall all my old versions, when I upgraded to Sierra (I still run CS6 on occasion for clients, but it has problems)
The only way I can figure to do it at all (which is what I do for my older versions) to buy an emulation program like Parallels. Create a Virtual Machine with an older OS (Mavericks ran CS5 well, and was licensed to be used in a virtual environment). Then, download a trial of the old CS5, and install with your serial number into that OS.
The greatest difficulty with this is getting a download of Mavericks (or any earlier version of the OS). You'd need someone who'd originally downloaded it on their Apple Store account, and make a bootable USB disk to install it on your computer. The trial for CS5 extended can be safely downloaded from Download Adobe CS5 Free Trials – All Direct Links without Akamai | ProDesignTools
If you want to try, you can download the installers direct from Adobe direct to your Hard drive.
And since it is Sierra, Adobe has special install instructions you need to follow. You cannot directly run the installer.
If all goes well, update the AAM to get your updates in.