You will need to 'Dual Boot' your MacBook Pro.
The steps are too many to list here, and there's many guides on the internet to assist you, step by step.
But the general notion is that you plug an external hard drive into a USB port, run the Mac OS X 10.5 installer and chose the external drive to install it on.
On restart, hold down the Option-key until an interface appears and select either Mac OS 10.10.4 or 10.5.0 to boot into. Conversely, you can partition your main hard drive, but w/o specialized software, you will need to reformat your drive to first partition it, then re-install 10.10.4 on one partition and 10.5.0 on the other, this latter option would save you $80+ on an external drive.
The other method is to install Virtualization software (the two major brands are VMware Fusion and Parallels Desktop 9) which both have licensing costs, but save you from having to perform a restart - Mac OS X 10.5 simply runs in a window within 10.10.4. Parallels sell for about $75 and Fusion 7 currently sells for about $65.
Conversely, you could upgrade to an all-in-one printer from Canon or other manufacturer as they often include 1200 and 2400dpi color scanners that work with 10.10.x. I've seen many all-in-ones sell on sale for $80 and without sales for about $130. Dedicated scanners with 4800dpi fidelity seem to sell for about a hundred bucks.
You will need to weigh how you want to do things - dual boots or new gear.