Let's recall the following definiton.
A function $f \colon X \to Y$ is called onto (i.e. surjective) if for each $y \in Y$, there exists a $x \in X$ such that $f(x) = y$, which means that the range is exactly the codomain $f(X) = \{f(x) \mid x \in X\} = Y$.
Therefore, a function $f \colon X \to Y$ is not onto if and only if there exists a $y \in Y$ such that $f(x) \neq y$ for all $x \in X$.
For the given function $f \colon \mathbb{R}^{*} \ni x \mapsto 1 + \frac{1}{x} \in \mathbb{R}$, we know that there exists a $y = 1 \in \mathbb{R}$ and $f(x) = 1 + \frac{1}{x} \neq 1 = y$ for all $x \in \mathbb{R}^{*}$, which completes the proof.
Your approach works as well and gives a finer consequence. In fact, you have shown that the restriction function $g \colon \mathbb{R}^{*} \to \mathbb{R} \setminus \{1\} = \{y \in \mathbb{R} \mid y \neq 1\}$ is a one-to-one and onto function (i.e. bijection).
However, in order to give a formal proof, it is better to avoid using the imprecise phrase "the inverse of the function" if you haven't proved that the function is one-to-one and onto. Because a function is invertible if and only if it is one-to-one and onto.
follows y= x+1/x
y= x+1/x xy=x+1
xy-x=1
x(y-1)=1
x=1/y-1
Next we’ll interchange x and y i.e., replace x with y and y with x. So we’ll get:
y=1/x-1 . I was thinking that since the domain of the inverse of a function (f) is equal to the range of the actual f() maybe use this method??? Is this actually correct?
– user1138115 Jan 09 '23 at 04:43