Five persons with names P, M, U, T and X live separately in any one of the following: a palace, a hut, a fort, a house or a hotel. Each one likes two different colours from among the following blue, black, red, yellow and green. U likes red and blue. T likes black. The person living in a palace does not like black or blue. P likes blue and red. M likes yellow. X lives in a hotel. M lives in a
Based on the information given in the question $M$ lives in a palace because it is given the person who lives in the palace does not like blue and black. so based on this $P, U, T$ can not correct choice and it is also given that $X$ lives in a hotel. so the correct choice is $M$.
Option (B) is correct.