It is given:

If you succeed to solve a Sudoku with probability 0.4 and you try many times, how likely is it that you succeed twice before you fail 5 times? What is the expected number of failures before two successes?

I don't understand which one between the binomial, geometric, negative binomial distribution I need to use. I know that probability of success is 0.4 and probability of failure is 1-0.4 = 0.6.

I have always had a number of failure before the r successes, but never successes before failures.