derivatives of inverse functions

this topic probably isn't supposed to be hard but i find it very confusing. my teacher went over it very briefly if not at all and my book doesn't help explain either. so it's my understanding that if you let y = f^-1 (x), then dy/dx = 1 / (dx/dy) and if you let y = f(x) and x = f^-1 (y), then dx/dy = 1 / (dy/dx). so derivatives of inverse functions can be written in 2 different ways? one of my problems asks to find the derivative of e^x (which i already know is e^x) by finding the derivative of the inverse of ln x. i did dy/dx = 1 / (1/y) = y. i also did dx/dy = 1 / (1/x) = x. how do i get e^x for either one? my equations are y = lnx and the inverse of that is x = lny.