Best practice needed: 1 NAS 2 Devices

I’m wondering what would provide the best performance and stability in general. Usually I just try things out, but I don’t want to screw up my file / folder structure, so asking here beforehand.

I have an off-site NAS; say location X. Then two Desktop PC’s at location Y (same LAN). They all share 1 (the same) folder with the NAS. When I add a large amount of data (say 3GB) at one of the desktops the files are synced over the internet, and then back to the other desktop. This is not very efficient because it syncs back and forth over the internet. Is it possible to connect the two desktops so files are shared to the NAS (internet) AND locally if the two are on the same LAN? And also keep sharing if the NAS is offline / unavailable?

Folders are not 1 to 1, you can share the same folder with the NAS and the other desktop, which will then sync directly regardless if the NAS is online or not.