First the prob. that it came from A is .3 and the prob. that is is defective is .01
So the prob. that is came from A and is defective is
Now you need to repeat this for B and C and sum the probabilities. (why?)
For part b you need to use conditional probabilities
Let A be the even that the item is defective and B be the event that it came from machine B. Then
Now use your result from part a.