Understand IP addresses and location
Solution 1:
A.B.C.001 and A.B.C.002 are very likely to be in close physical proximity, possibly as likely as 99% that they are on the same city block.
A.B.C.001 and A.B.C.254 are only slightly less likely to be so.
A.B.001.D and A.B.002.D are less likely still, perhaps 90%, for a 256x as large definition of "close".
A.B.001.D and A.B.254.D slightly less likey again.
This pattern continues. You could calculate relatively accurate percentages for the top two octets by simply polling a reliable geolocation service.
In the olden days (2006) when IPv4 still had plenty of available address space, xkcd made a Map of the Internet that shows distribution of the first octet by country and organization. It's gotten a lot denser since then, but the general pattern continues, with neighboring first octets having about a 30% chance of being in the same country or region.
Solution 2:
Does it generally stand to reason that the nearer IP address A is to IP address B numerically, then the nearer IP address A is to IP address B geographically?
Most definitely not.
IP Netblocks are handed out by IANA to the Regional Internet Registries (RIRs), who in turn hand out netblocks to individual organizations in their region. Once handed out, each recipient org can do whatever they want with those address. So, while a netblock may be initially handed out in the APNIC region, there's nothing preventing a company from using those IP addresses say, in Europe or the United States.
Additionally, some addresses in a netblock may be used in one corner of the globe, while others in a completely opposite corner.
See, for instance, IANA's IPv4 Address Space Registry page. 40/8
is allocated to the Eli Lily company, 41/8
is allocated to AfriNIC, and 42/8
is allocated to APNIC. Those three sequential netblocks are allocated to three geographically disparate bodies.