Math Help - Proving a function is a one-to-one correspondence

1. Proving a function is a one-to-one correspondence

Determine whether each of the following functions is one-to-one, onto, neither or both.

$f : (2, \infty) \rightarrow (1, \infty)$, given by $f(x) = \frac{x}{x-2}$

So, I think this is one-to-one and onto. So i need to prove it.

Claim: If $f : (2, \infty) \rightarrow (1, \infty)$, given by $f(x) = \frac{x}{x-2}$, then f is a one-to-one correspondence.

Proof: Assume $f : (2, \infty) \rightarrow (1, \infty)$, given by $f(x) = \frac{x}{x-2}$.
First we must show that f is one-to-one.
Let $a,b \in (2, \infty)$ such that $f(a) = f(b)$.
Notice that
$f(a) = f(b)$
$\frac{a}{a-2} = \frac{b}{b-2}$
$a(b-2) = b(a-2)$
$ab - 2a = ab - 2b$
$-2a = -2b$
$a = b$
Hence, f is one-to-one. Here, do I need to use the fact that the codomain is (1, infinity) or the domain is (2, infinity)?

Now we need to show that f is onto. Let $b \in (1, \infty)$ and take a = ....
Here I would have solved b = a / (a-2) for a, but I do not know how to solve this. Is there any other way to do this proof besides solving for a then substituting back in to show that it gives me f(a) = b?

2. That works. Also the derivative is everywhere negative.

3. How do i prove that it's onto though?

4. $f(x) = \frac{x}{{x - 2}}\quad \Rightarrow \quad f^{ - 1} (x) = \frac{{2x}}{{x - 1}}
$

This works as I said above.

5. gotcha, thanks.