To my knowledge that feature has long since been removed.<p><a href="https://support.apple.com/en-us/HT204592" rel="nofollow">https://support.apple.com/en-us/HT204592</a>
You can use mac-to-mac airplay, but it's only available on the latest version (beta) of Monterey and only if you're using a modern mac (which I assume your iMac is).<p><a href="https://www.apple.com/macos/monterey/features/" rel="nofollow">https://www.apple.com/macos/monterey/features/</a>