The equation is the following: $$y = \frac{x}{x-2}$$
What I did is:
$$y = \frac{x}{x-2}$$
$$y \times (x-2) = x$$
$$\frac{x-2}{x} = \frac{1}{y}$$
$$\frac{x}{x}-\frac{2}{x} = \frac{1}{y}$$
$$1-\frac{2}{x} = \frac{1}{y}$$
$$1-\frac{x}{2} = y$$
I've got a lot of doubts about that last step. Besides that, the result according to the textbook is the following:
$$ f^{−1}(x)=-\frac{2x}{x−1} $$
Sorry, no, you can't take recirocals of the terms the way you have.
That is
$\frac {1}{a+b} \ne \frac 1a + \frac 1b$
Anyway
$y = \frac{x}{x-2}\\ y(x-2) = x\\ yx - 2y = x\\ yx - x = 2y\\ x(y-1) = 2y\\ x = \frac {2y}{y-1}$
$f^{-1}(y) = \frac {2y}{y-1}$