After identifying the network identifier of a host, it is easy to determine whether another host is behaving locally or remotely with that host. To do this, compare the network identifiers of the two hosts. If the network identifiers match, the two hosts are on the same subnet. If the network identifiers do not match, the hosts are on different subnets, and a router is required to transfer data between them.
You have two computers A and B with the IP addresses 192.168.1.100 and 192.168.2.100 and the subnet mask 255.255.0.0. The network identifiers of the IP addresses are identical. Therefore, computers A and B are local.
An another example, the two computers A and D have the IP addresses 192.168.1.100 and 192.168.2.100 and the subnet mask 255.255.255.0. The network identifiers of these IP addresses are not identical. Therefore, Computer A is remote with respect to Computer D.