Man picks key randomly to try and open his door. If it isn't right one, he tries the next key without returning the first. What is E(X)? 
Man picks key randomly to try and open his door. If it isn't right one, he tries the next key without returning the first. What is E(X)?

The prior question was what is the average amount of attempts if the keys aren't returned.
This was just simple usage of the expected.value of a geometric distribution, $E(X)=\frac{1}{p}$, where $p=\frac{1}{k}$, so $E(X)=k$.
This question is causing me some trouble.
If he doesn't return the key, the probability to get it on the next attempt is higher (that is, if he fails to get it on the first attempt), and so the probability he'll get it as the number of trials increases, also increases. But it also says the that the probability is uniform across attempts. 
I'd appreciate if someone could explain to me how that's possible.
 A: Arrange the keys randomly in a row from left to right.  All arrangements of keys are equally likely.
Since the probabilities are uniform at each trial, reason that the man's chances of success have nothing to do with his strategy for picking keys.
Without loss of generality then, we may assume that the man always picks keys from left to right.
The number of guesses required until the man guesses correctly is then the position of the correct key.
  
Conclude:

 For $k=10$, then: $$\Bbb E[X] = \frac{1}{10}\cdot 1 + \frac{1}{10}\cdot 2 + \dots + \frac{1}{10}\cdot 10 = \frac{1}{10}(1+2+\dots+10)=5.5$$

A: 
If he doesn't return the key, the probability to get it on the next attempt is higher (that is, if he fails to get it on the first attempt), and so the probability he'll get it as the number of trials increases, also increases. But it also says the that the probability is uniform across attempts. 
I'd appreciate if someone could explain to me how that's possible.

On the first attempt the probability for getting the right key is $1/k$.   If that failed then on the second attempt the (conditional) probability for getting the right key will be $1/(k-1)$.   And so on...  If by chance it he gets down to the last key without prior success, then the probability for it being the right one becomes $1/1$ (well, hopefully, if the right key hasn't been lost).
That is how the conditional probabilities for success on the next try increases with each progressive failure.     IE: the conditional probability for success on trial $x$ when given that none of the prior attempts succeeded is:
$$\mathsf P(X=x\mid X>x-1) ~=~ \dfrac 1{k-x+1}\quad\Big[x\in \{1,.., k\}\Big]$$
However, if we were to ask "what is the probability for success on trial $x$," then the probability is not conditioned by prior failures.   Lay out the $k$ keys in a row; ordered by planned order of attempt.  If there is no bias in selecting this order, then we have a discrete uniform distribution; and the probability is $1/k$.   Notice: this is not determined by the position, $x$ (well, if $x$ is in the support).
That is how it is uniform across attempts.      IE: the marginal probability for success on trial $x$ is:$$\mathsf P(X=x) ~=~ \dfrac 1 k\quad\Big[x\in \{1,.., k\}\Big]$$
