To get to 10.5 you must purchase the install DVD.
Apple is no longer sell it so you must pirchase it else where.
If your Mac will run 10.6, Apple is still sell the install DVD for that and they are cheaper.
Mac OS X 10.5 Leopard installation system requirements
Look on eBay or Google the installer part numbers to possibly find at an on-line store. Here's what to look for:
MB427Z/A Leopard 10.5.1 install DVD
MB576Z/A Leopard 10.5.4 install DVD
MB021Z/A Leopard 10.5.6 install DVD (single user)
MB022Z/A Leopard 10.5.6 install DVD (5-user family pack)
Installing Mac OS X 10.5 Leopard
Mac OS X 10.5 Leopard Installation and Setup Guide
After you install the base 10.5, download & install the 10.5.8 combo update at http://support.apple.com/downloads/Mac_OS_X_10_5_8_Combo_Update
The DVD should look like this
Caution - Leopard does not support classic mode. So, if you currently open OS 9 apps in classic mode, you won't be able to do this if you upgrade to Leopard.
If your Mac is a PowerMac, you can only go as high as OS X 10.5 Leopard.
Apple is now selling these again as replacement retail OS discs.
Call Apple direct at 1-800-MYAPPLE and ask for OS X software sales.
Tell them you need a copy of OS X 10.5 Leopard. You will need to give the Apple rep your Mac's serial number.
You will be charged less than $20 U.S. for these discs.
See these links for more info.