(i) Since the number of keys available keeps decreasing, the probability would be $${6\over 7}{5\over 6}\cdots {3\over 4}{1\over 3}=\frac{6*5*4*3}{7*6*5*4*3}=\frac{1}{7}$$
(ii) Now it would have to fail four times and then work one time: $$P=\left({6\over 7}\right)^4\left({1\over 7}\right)=\frac{6^4}{7^5}$$ Note that (i) is about twice as large as (ii) - it makes sense that it's bigger because the "bad" keys are being thrown out as they go.