Pregunta de entrevista de EXL Service

Question on total probability theorem.