You can find free trial versions at the site linked below, though you won't be able to do much more than the trial with them if you don't have a serial number from a purchased copy.
Be sure to follow the steps outlined in the Note: Very Important Instructions section on the download pages at this site.
Is your Mac Intel-based or Power PC-based?
Last Photoshop version for 10.5 on Power PC was CS4.
Last Photoshop version for 10.5 on Intel was CS5.