I think the problem is that you can't install an older OS X version onto a system running a newer OS X version. So I would try the following:
1. have an external disk or create another partition on an internal drive to use for the Mountain Lion install (you might have to shrink an existing partition to make room for another)
2. Create an external bootable USB thumb drive with the Mountain Lion OS on it (do a search on the web for this - for example see http://www.macworld.com/article/1167857/how_to_make_a_bootable_mountain_lion_ins tall_drive.html
3. Reboot Yosemite and then boot from the USB thumb drive by holding down the option key
4. run the mountain lion installer and install on the new disk/partition you created in step 1 - it will also create another recovery partition from this same part of the disk
Now your Mac system will have both a Mountain Lion install as well as the Yosemite install. You won't be able to use Migration Assistant to move things from Yosemite to Mountain Lion because it will see that you're "going backwards" and won't allow you to.
Have a good backup of everything before starting in case there are problems.
Good luck...