Hi and Welcome. My Name is ***** ***** I look forward to assisting you today with your question.
I'm working on your question. I will reply back ASAP
The latest version of Mac OS is version 10.12 Sierra. But your Mac will not support 10.12 Sierra. However, it can handle the previous 10.11 El Capitan.
Since you are using 10.5.8, you will not be able to download it from internet. So you have to buy the 10.11 El Capitan USB drive from online (eBay.com) and use it to upgrade the OS X. You can buy it from here -->
When you get the USB drive, just put it on your Mac, then restart your Mac and immediately hold down Option key on keyboard for 5-10 seconds and this will bring Start up manager. Select Mac OS X USB drive and press return and this will bring installer. Follow the onscreen instructions to upgrade.
If you have any questions or would like any additional information, please don't hesitate to ask.
Note : this is not my final answer. If my solutions didn't work, please don't rate me bad or poor or ok. Instead please reply back to me and I will continue to help you until we fix the problem or until you are satisfied.
I strive to provide Excellent service or 5 star rating. If you feel you've received anything less, please don't rate anything. Instead, please let me know and I will try my best to help you until you are fully satisfied.