I've just seen at least some of the error of my way, though I'm not sure why the previous method is wrong.

Anyway, using the technique from that chapter, P(R<ln(x/5000)) =F(r) thus

f(r)=F'(r)=25*(5000/x)*(1/5000) = 25/x which is at least some of the way to the book's answer but not all the way there.