The probability of picking a green marble the first time is 3/20 and the probability of picking a yellow marble the second time is 8/20. probabilities are heavily related to percents so it would make sense that the probability of picking a color would be the number of that color divided by the total number.
note that it is really important that the problem said that the marble was replaced. If the marble was not replaced, the probability of picking a yellow marble the second time would be 8/19 if the first marble picked was not a yellow one.