Let $f(x) = 1/(1 + 2x)$. I want to show that $f^{-1}(y) = (1 - y)/2y$. Is it sufficient for me to show
$$f\left(\frac{1-y}{2y}\right) = \frac{1}{1 + 2(1 - y)/2y} = \frac{1}{1 + (1 - y)/y} = \frac{1}{y}= y?$$
Or, is there another way that this assertion needs to be proved?
As an alternative firstly note that $f(x)$ is defined $\forall x\neq -\frac12$ and since
we have that $f(x):\mathbb{R}\setminus\{-1/2\}\to \mathbb{R}\setminus\{0\}$ is bijective and then invertible.
To find the inverse we need to solve
$$x=\frac{1}{1+2y}$$
and find $y=g(x)=f^{-1}(x)$.