Hi,
So I assume that if you are in the same subnet it works.
There are couple of possibilities, first is there is no name resolution available for different subnets. Could you try IP address or using hosts file?
The other possibility is Windows Firewall. When you enable File and Printer sharing, it only enables for the local subnet by default. Could you check if it is enabled for all subnets? (using Edit->change scope)
Krish