Like in situation with High Sierra You have only one easy way to make Mac OS X 10.10.5 Yosemite Install USB.
We’ll use Terminal.
I sold macbook pro os x yosemite to my friend, and this post for him.
This video shows how to make Mac OS X 10.10.5 Yosemite Install USB in Terminal.

You CAN {Download}
Install MacOS Yosemite.dmg