EXL Service interview question

Question on total probability theorem.