I suppose the part about
"B1, B2, and B3, make 35%, 40%, and 25%"
should be taken to mean [tex]B_1[/tex] produces 35% of some product, [tex]B_2[/tex] produces 40%, and [tex]B_3[/tex] produces 25%. Then
[tex]\begin{cases}P(B_1)=0.35\\P(B_2)=0.4\\P(B_3)=0.25\end{cases}[/tex]
Each machine has some probability of making a defective product - denote this event by [tex]D[/tex]. Then
[tex]\begin{cases}P(D\mid B_1)=0.02\\P(D\mid B_2)=0.03\\P(D\mid B_3)=0.04\end{cases}[/tex]
We want to find the probability that a defective product was made by machine [tex]B_3[/tex], i.e. [tex]P(B_3\mid D)[/tex]. By definition of conditional probability and the law of total probability, we have
[tex]P(B_3\mid D)=\dfrac{P(B_3\cap D)}{P(D)}[/tex]
(def. of conditional probability)
[tex]P(B_3\mid D)=\dfrac{P(D\mid B_3)P(B_3)}{P(D)}[/tex]
(def. of conditional probability)
[tex]P(B_3\mid D)=\dfrac{P(D\mid B_3)P(B_3)}{P(D\cap B_1)+P(D\cap B_2)+P(D\cap B_3)}[/tex]
(law of total probability)
[tex]P(B_3\mid D)=\dfrac{P(D\mid B_3)P(B_3)}{P(D\mid B_1)P(B_1)+P(D\mid B_2)P(B_2)+P(D\mid B_3)P(B_3)}[/tex]
(def. of conditional probability; this result is also known as Bayes' theorem)
So we have
[tex]P(B_3\mid D)=\dfrac{0.04\cdot0.25}{0.02\cdot0.35+0.03\cdot0.04+0.04\cdot0.25}\approx\boxed{0.345}[/tex]