induction. if prisoner D is silent, prisoner C must know he has a different colored hat on that prisoner B, so prisoner C guesses the opposite color of prisoner B's hat.
Prisoner D sees 2 different colours so he won’t speak up. Prisoner C sees prisoner B wears white and that notices that prisoner D doesn’t speak up, prisoner B wears white meaning that he himself has to have a black hat on his head