I am solving here through elimination type procedure
The subnet mask 255.255.x.x belongs to class B type(IP address range will be from 126.96.36.199 to 188.8.131.52) so we can eliminate option B
Now we understand A, C, D belongs to class B network.
we will do a bit by bit AND operation of network and subnet mask to find the subnet.
A)184.108.40.206 and 220.127.116.11
C)18.104.22.168 and 22.214.171.124
D)126.96.36.199 and 188.8.131.52
clearly, we see the second octet of option A and C (57,56 203,234 are different. 57 & 255, 56 & 255 will give different values 203 & 255, 234 & 255 will give different values) are different so this implies that they don't belong to the same subnet.
Now we eliminated A B C then option D will be the answer.
still, if you want to check the answer for being safe side then follow below procedure
now for first option D the first two octets are same so you don't need to do AND with 255 and waste time so now go to the third octet
129 =1000 0001 161=1010 0001
31= 0000 11111 31= 0000 11111
0000 0001 0000 0001
The third octet of subnets are same(first 2 octets are also same).
still not confident abt D then do fourth octet of network AND with fourth octet subnet mask.
Here anyhow fourth octet of mask is 0 so anything AND with 0 is zero
So the conclusion is, D is the correct answer.
Comments are always welcome!!!
There is no carry in doing AND operation. it is just bit by bit AND.