This is the function: $f: \mathbb{R} \to (0, \infty)$ defined by $$f(x) = \begin{cases} \dfrac{1}{1 - 2x}, & \text{$x < 0$}\\[2mm] 1 + 2x, & \text{$x \geq 0$} \end{cases} $$
This is the inverse function: $f: (0, \infty) \to \mathbb{R}$ defined by $$f(x) = \begin{cases} \dfrac{x - 1}{2x}, & \text{$x \in (0, 1)$}\\[2 mm] \dfrac{x - 1}{2}, & \text{$x \in (1, \infty)$} \end{cases} $$
I proved that f is injective and surjective so f is bijective thus there is an inverse function, I just need to be sure I determined the inverse correctly.