*************
OSX Hackers.net run by Isiah Johnson aka TMRJIJ is doing his best to develop ways of bringing new OSX systems to aged Macs.
I have used the less complicated tool proposed in that site called MCPF.
The other method called The Extractor requires more technical knowledge that the one I have and is much more delicate, while MCPF works more or less straight forward.
Although some people report that they managed to install in old MacBooks like yours Yosemite, in my MacBook 4.1 early 2008 I could reach OSX 10.9 Mavericks but not Yosemite.
I tried repeatedly but Mavericks was the newest OSX that I could install.
What you should first of all do is to secure the present OSX of your Macbook making a so called bootable clone drive either in an USB stick or an external drive. The best application to obtain a bootable clone of your present system (OSX 10.6 Snow Leopard or 10.7 Lion, I presume) is CarbonCopyCloner.
Backups like those made with TimeMachine are also a good protective measure in many cases.
Keeping a bootable clone drive of your original OSX system helps you, if your efforts to install a newer OSX fail, to restore your original system before any new experiment.
You can never be TOO cautious, especially when trying new things in an aged computer, things not foreseen by the company which made it.
Backups and clone drives are essential to avoid possible big worries.
Good luck!
Ed