SquarePoint Interview Question

Conditional probability, monte carlo simulation when I could not answer it