Open Disk Utility and restore the USB drive using the InstallESD.dmg on your hard drive, if you can't find your hard drive in the Open dialog, press cmd+shift+g and you can enter the path manually.cp /Volumes/USBDrive/InstallESD.dmg /Volumes/Macintosh\ HD/, where you replace the paths with the ones found in step 2)
Boot into the MacBook's Recovery Partition. Mac OS X 10.10 Yosemite DMG File by Apple Inc.Copy the InstallESD.dmg file onto the USB drive (just copy, not burning etc).Assuming that the InstallESD.dmg is on the windows 7 computer: