StackAdapt Interview Question

A question on Conditional probability