What I know about the mean of the negative binomial distribution is E(x)=r(1-p)/p. but there are some questions use E(x)=r/p as the mean. Very confusing and I don't understand at all.

For example:

Repeatedly roll a fair die until outcome 3 has occurred for the 4th time. Let X be the number of times needed in order to achieve this goal. Find E(X) and Var(X)? My answer: negative binomial with r=4, p=1/6. E(x)=r(1-p)/p=20 However, the right answer is: E(x)=r/q=24

and for this question: The probability that a basketball player makes a free-throw shot is 60%. The player was asked not to leave practice unless he makes 10 shots. Let Y be the number of free-throws missed prior to the 10th shots. Find the mean and the variance of Y. My answer is right. Negative Binomial with r=10,p=0.6. E(y)=r(1-p)/p=6.67

I don't understand why there are 2 formulas and how to tell the difference, which one I should use?