To determine which machines belong to the same subnet, we perform a bitwise AND between each IP address and the subnet mask 255.255.255.252 (a /30 mask with a block size of 256−252=4 addresses per subnet).
Looking at the last octet:
For Machine M (100.10.5.2):
Subnet ID=2 AND 252=0⟹100.10.5.0/30 Usable IP range: 100.10.5.1 to 100.10.5.2.
For Machine N (100.10.5.5):
Subnet ID=5 AND 252=4⟹100.10.5.4/30 Usable IP range: 100.10.5.5 to 100.10.5.6.
For Machine P (100.10.5.6):
Subnet ID=6 AND 252=4⟹100.10.5.4/30 Usable IP range: 100.10.5.5 to 100.10.5.6.
Thus, only N and P belong to the same subnet (100.10.5.4/30), whereas M belongs to a different subnet (100.10.5.0/30).
Therefore, option (C) is correct.