Let $E_1$ be the event that the item is produced by machine A. P($E_1$) = 60% = $\large\frac{60}{100} = \frac{3}{5}$

Let $E_2$ be the event that the item is produced by machine A. P($E_2$) = 40% = $\large\frac{40}{100} = \frac{2}{5}$

Let A be the even that we choose a defective item at random:

P (the defective item came from machine A) = P (A|$E_1$) = 2% = $\large\frac{2}{100}$

P (the defective item came from machine B) = P (A|$E_2$) = 1% = $\large\frac{1}{100}$

We need to find the probability that a defective item randomly selected was produced by machine B

We can use Baye's theorem, according to which $P(E_2|A) = \large\frac{P(E_2)(P(A|E_2)}{P(E_1)P(A|E_1) + P(E_2)P(A|E_2)}$

P ($E_2$|A) = $\Large\frac{\frac{1}{100}.\frac{3}{5}}{\frac{1}{100}.\frac{3}{5} + \frac{2}{100}.\frac{2}{5}} $ = $\Large \frac{\frac{2}{500}}{\frac{6}{500}+\frac{2}{500}} $=$\large\frac{2}{8} = \frac{1}{4}$