Let required probability be p(n) for n>1
There are two possibilities (i) first person A gets his own coat, prob.=1/n
(ii) first person A randomly takes someone else coat but not the coat of last person,for this n-2 possible choices out of n. Now the person B whose coat was taken by A comes at kth (k=2,3,4 . . .,n-1) position (its probability 1/(n-2)). For him there will be n-k+1 coats available including the coat of A and of the last person. In this case we can rename the coat of A as the coat of B and B is randomly selecting one of the coat out of n-k+1 coats
=> p(n) = (1/n) +[(n-2)/n]*sum from 2 t0 n-1 of [{1/(n-2)}*p(n-k+1)]
= (1/n) +[1/n]*sum from 2 t0 n-1 of p(k)
=> np(n) = 1+sum from 2 t0 n-1 of p(k) --------(1)
=>(n+1)p(n+1) = 1+sum from 2 t0 n of p(k) --------(2)
from (2)-(1), (n+1)p(n+1) - np(n) = p(n)
=>(n+1)p(n+1) = (n+1)p(n)
=>p(n+1) = p(n)
As p(2)=1/2, p(n) = 1/2 for n>1