mrabar -- the series "255.255.255" in the subnet mask, applies to the first 3 quads of the IP (172.172.200) meaning those 3 quads must match for communication to happen. This is likely why your third ping to 18.104.22.168 worked, but the others failed. If you change the mask to 255.255.0.0 then the first two examples should work as the third does. Please tell us if that works.
Meanwhile, I will have your question moved to a new thread of its own -- in the future, please do not tack a question onto someone else's pre-existing thread
Welcome to LQ,