Let
The probability that the items produced by machine
The probability that the items produced by machine
The probability that the items is defective is
The probability that the item was produced by machine
The probability that the items produced by machine
The probability that the item is defective, if produced by machine
The probability that the items produced by machine B is,
The probability that the item is defective, if produced by machine B,
Put these values in equation (1),
Thus, the required probability is