Another angle: Maybe the user is using a Mac that can't run newer macOS versions and needs Yosemite for compatibility. They might need to find a way to legally obtain it through Apple's channels. If they can't, maybe suggest alternative solutions like using a virtual machine with a later OS or finding compatible software.
Also, there's the Apple Developer website where developers can access older versions. If the user has access to a developer account (either personal or company), they can download from there. But if they don't have one, that's another hurdle. mac os x yosemite 1010 5 download dmg link
Another thought: Apple sometimes hosts older OS versions through their support/downloads. Maybe there's a direct DMG link there. But I need to check if that's available. For example, Apple has a support page for older OS versions, and the direct download links are provided there. Let me recall the URL structure. It would probably be something like download.apple.com or support.apple.com. The exact URL for Yosemite 10.10.5 might require specific parameters. Another angle: Maybe the user is using a