ok, here goes.
This is a conditional probability problem. And since you are probably in statistics since you are asking this question, you should know that the probability of A given B is equal to the (prob. of A intersect B) divided by the prob. of B. Mathematically:
P(A|B)=P(A,B)/P(B)
So, we need to figure out what are the A (what you are trying to find) and the B (what you are given). First with P(B), which for the first case is the probability that neither of the tested items were defective. To find P(B), we need to look at all possible cases. Lets say that the batch actually had 2 defective units. Then the probability of selecting one and it working properly is 8 possible good ones divided by 10 possible choices. Now one good one is gone and there are 9 choices remaining, so when you test the second, the odds are 7/9 that it isn't defective. This case will happen 20% of the time.
Now assume the batch actually had 1 defect. By the same reasoning, you have 9/10 the first test, and 8/9 the second test. This happens 30% of the time.
Assuming the batch had 0 defects, you would have 10/10 first and 10/10 second, which happens 50% of the time.
Your total P(B) is thus:
P(B)=(8/10)*(7/9)*.2+(9/10)*(8/9)*.3+(1)*(1)*.5
P(B)=.86444444
Now we need to find P(A,B). If we are trying to find the probability that there are actually 0 defects (call this P(A0|B), then P(A,B) is just the last term of P(B).
P(A0|B)=1*1*.5/.8644444=.5784
If were trying to find the prob that there is actually one defect, P(A1|B), P(A,B) is the second case from above.
P(A1|B)=(9/10)*(8/9)*.3/.8644444=.2776
Finally, for the prob that there are actually two defects, P(A2|B), P(A,B) is the first case.
P(A2|B)=(8/10)*(7/9)*.2/.864444=.1439
---------------------------------------------
The second case is very similar, only now you test one defect.
So now finding P(B) goes like this. Assume there were two actual defects. The prob of selecting one defect to test is 2/10, then selecting one good one to test is 8/9. This happens 20% of the time.
If there was actually one defect, then the prob of selecting the one defect to test 1/10, and then the prob of selecting a good one is 9/9. This happens 30% of the time. Finally if there are no defects in the batch, the prob of selecting a defect to test is 0. So P(B) is
P(B)=(2/10)*(8/9)*.2+(1/10)*1*.3+0*.5=.0655555
Now again, for P(A,B) just pick out the correct term from above.
P(A0|B)=0/.0655555 = 0
P(A1|B)=(1/10)*1*.3/.0655555 = .4576
P(A2|B)=(2/10)*(8/9)*.2/.0655555 = .5424
Good luck on your exam or hw, or whatever it is you are working on.