installing OEM software on the new SSHD-- then upgrading the OS

I have a iMac EMC 2210 model A1224 SN=W8836042EZ2. There are 2 gray disks that came with the mac. disk 1 indicates the version OS X 10.5.4. After installing the OS, I would like to upgrade to Yosemite. I believe I was running mountain lion 10.8.5 before the crash. I'm sure I paid for an upgrade or two via the app store. will I have to repay for those upgrades? what would be the correct process to upgrade to Yosemite?

Thanks,

Frank

crwdns2934089:0crwdne2934089:0 crwdns2934093:0crwdne2934093:0

crwdns2934109:0crwdne2934109:0

crwdns2889612:0crwdne2889612:0 0
crwdns2934285:0crwdne2934285:0