For starters you are going to have to find out what OS was on the returned Mac and then find out what .v Mac you have now to find out if you can upgrade it to the OS that was on the returned Mac. 10.5 is Leopard goes back quite a few years. Mind you you can't update that OS any further. 10.5.8 was as high as it went. From there we have ton up to 10.6 Snow Leopard, 10.7 Lion and now we are at 10.8 Mountain Lion.
So you need that other information, because i recently did a wipe of my HD and reinstall, and i couldn't use 2 Apps even tough i had 10.8, i needed to do a the Software Update before i could use them, and i only had to goto 10.8.3 . . .
10.5.8 could run on a PPC or a Intel Mac, and if its a PPC Mac, you can't go any higher in OS because 10.6 and on is Intel only. If this is the case you will need to buy a Intel Mac that can upgrade to the OS that was on the returned Mac, BUT you need to know what that OS was, and what Mac you have now. To do that click the in the top left of screen and then About This Mac and then giver us some details to work out what you have.
Cheers ™