Word problem involving the probability of a union or an intersection