How to stop MacBook Air desktop being shown on another computer on network
On the other computer that is public. Open iCloud preferences and turn of iCloud files. Consider signing out of iCloud entirely on that other computer.

For even more protection:


Turn off iCloud document sync on the source computer (or move the sensitive files to another folder that doesn't sync to iCloud). This eliminates the ability to access those files from iOS, though.
Store sensitive files in an encrypted DMG - they will still sync, but without a password to unlock the image - the files are not indexed or accessible.


In the future, Apple's new file system will allow file level encryption so that you can be less selective about sensitive files syncing but more selective about which are locked from inadvertent access (whether spotlight or just opening the file). This is probably 18 months off or more for total iOS / macOS adoption of APFS and file based encryption.