One of the popular proofs of the derivative of ln(x) is by implicit differentiation.
$$ \begin{align*} y &= \ln x \\ e^y &= x \tag{2} \\ e^y dy &= dx \\ \frac{dy}{dx} &= \frac{1}{e^y} \tag{4} \\ \frac{dy}{dx} &= \frac{1}{x} \tag{5} \end{align*} $$
From (4) to (5), the $e^y$ has been substituted by $x$. I am confused to why we can make this substitution. The first time I saw this proof it made sense to me... and as more time passes it is making less sense now.
What exactly is x? On an intuition built from graphs (aka mine) x is just the x-axis, and y changes as the value of x changes on the x-axis, a function of x. But if x is just the x-axis then why can we make the substitution? On eq. (2) the subject had been changed, which becomes more confusing. Now, as I look at it, x is a function of y, and y is also a function of x simultaneously, which means now I don't know what exactly y is either.
I don't think it's a stretch to say that something went wrong in my reasoning here... I guess the main problem is that I don't understand implicit functions well. What is the explanation to this, and is there a better intuition for implicit functions?