It is a bit complicated. You're "holding it wrong", try to stop thinking about the IP addresses.
Here is the thing. With mDNS, all machines decide upon their own IP address, and publish it along with their host name. The only link/agreement between the machines is the use of a common multicast network address, 126.96.36.199 (for IPv4) and port, 5353/udp.
That multicast address is like a stream
, carrying messages of various kinds over the local network. A question doesn't elicit a direct answer; after a question, there will be an answer coming in, in time (or never).
To speed up things a little, all machines keep a local cache of the information they've seen recently. But the cache cannot be too long-lived otherwise it might hold obsolete information, e.g. still resolving a machine when in fact that wireless client has left the network.
On linux, you can see the information stream by using the "avahi-browse" command, e.g. "avahi-browse --all --ignore-local --resolve". You'll see a flow of service records, and machines names and IP addresses. You'll need to interrupt browsing by hitting control-C, or by adding option "--terminate".
IIRC "terminate" just drops on your lap the current contents of the local cache, before exiting. You may, or may not, see the info you wanted to see before browsing terminates.
Avahi has various other user commands, like "avahi-resolve", "avahi-resolve-host-name", "avahi-resolve-address" that you might want to use. Fundamentally these work like avahi-browse: send a message in a bottle and hope for the best.
In addition, since with zeroconf the IP address is selected by each machine on its own, there is no guarantee the address is valid for any length of time. Machines come and go, generating a more or less random address for themselves each time; IP conflicts might happen, causing machines to generate new IP addresses.
Now. I hope you're confused enough... Rely only on .local names