The mid-2009 MBPro is limited to El Capitan, so
Apple has a support page that takes you to a download link for the El Capitan installer app. Scroll part way down that page, where you will find the link "Get OS X El Capitan"
But --- before you do that, if you already downloaded El Capitan, to upgrade your old MBPro, then that link might still be in your App Store/Purchased tab, where you could simply click on Download.
Either way, the installer app will download to your Applications folder. It will automatically launch when the download is complete, so just quit the installer at that time. Copy the app to another drive, where you can keep that if you need it again. Use the app to create a bootable installer, either on its own partition on an external drive - or even better make your bootable on a USB flash drive. Apple has "easy-to-follow"
instructions for doing that in the terminal. Or, use one of the dedicated apps that makes that simple, such as DiskmakerX.