Find the inverse function of f.

f(x) = log5(x − 2)

Can someone explain to me how do i get this answer like this???? Thank you!!!

the answer is:
=ln(x-2)/ln(5)
f-1(x)= 5^x+2