Are you aware of Geometric and Negative Binomial r.v's? Look up their pdf's and use them as follows.

a) Is a Geometric r.v. with p = 0.1, because we are interested in a miss. Let x be the number of shots attempted. So we want .

b) Is a Negative Binomial r.v. with r = 3, and p = 0.1. Again we're interested in the miss. Let x be the number of shots attempted, we want