Example 10 (9th "Hope Cup" Invitational Training Question) The inverse function of the function $y=f(x+1)$ defined on the set of real numbers $\mathbf{R}$ is $y=f^{-1}(x+1)$, and $f(1)=3997$, then the value of $f(1998)$ is $\qquad$ .