Before doing any upgrading BACKUP!!!
You can upgrade to Yosemite 10.10.3. In order to do so, ensure the computer has 4GB or greater RAM. A late 2007 iMac may accommodate 6GB. If you upgrade the RAM, buy it from either Crucial or OWC (www.macsales.com). iMacs are sensitive to RAM so it is important to use high quality RAM.
Once the RAM is in good shape, purchase Snow Leopard from Apple's online store for $20. Next download and install 10.6.8 Update Combo v1.1 and then navigate to the Mac App Store and download and install 10.10.3.
NOTE: Chances are you may have legacy applications installed that are PPC based. In order to continue using these apps they must either be upgraded or replaced. You will need to inventory your apps to see if they are PPC, Intel, or Universal.