e^x/y^2= 8 + e^y ---->
e^x = 8 y^2 + y^2 e^y
So, in this case, we can solve for x in terms of y. Then you can simply consider x to be a fnction of y, differentiate w.r.t. y, yielding dx/dy and dy /dx is then 1/(dx/dy).
But in general, you can't solve for either x or y. Then, if you have an equation of the form:
f(x,y) = 0
that defines the relation between x and y, you can find dy/dx by computing the differential of f in terms of dx and dy and equating that to zero.
The infinitesimal change due to a change in x by dx and a change in y by dy is:
df = (df/dx) dx + (df/dy) dy
where df/dx is the so-called partial derivative of the function w.r.t. x, which is the derivative of f w.r.t. x while considering y to be a constant. And df/dy is the partial derivative of f w.r.t. y, here you keep x constant.
Then, if x, and y satisfy the equation, we want x + dx and y + dy to also satisfy the equation. Since f(x,y) was zero and f(x + dx, y+dy) are zero, the change in f must be zero as well, so we put df = 0:
(df/dx) dx + (df/dy) dy = 0 ----->
dy/dx = - (df/dx)/(df/dy)