Step 1: Understand the subnet mask.
The given subnet mask is $255.255.255.252$, which corresponds to a /30 network.
For a /30 subnet:
Block size $= 256 - 252 = 4$
Total IP addresses per subnet $= 4$
Usable host addresses per subnet $= 2$
Step 2: Determine the subnet ranges.
With a block size of 4, the subnet ranges in the last octet are:
$0\!-\!3,\; 4\!-\!7,\; 8\!-\!11,\; \dots$
Step 3: Find the subnet of each machine.
Machine M:
IP address = 100.10.5.2
This lies in the range $0\!-\!3$.
Subnet = 100.10.5.0/30
Machine N:
IP address = 100.10.5.5
This lies in the range $4\!-\!7$.
Subnet = 100.10.5.4/30
Machine P:
IP address = 100.10.5.6
This lies in the range $4\!-\!7$.
Subnet = 100.10.5.4/30
Step 4: Compare the subnets.
Machines N and P belong to the same subnet, while machine M belongs to a different subnet.
Step 5: Conclusion.
Only machines N and P belong to the same subnet.