Example 4 If $f(x-1)=x^{2}-2 x+3=(x \leqslant 0)$, find the expressions of $f(x)$ and $f^{-1}(x)$, their domains, ranges, and draw their graphs.
Solving: Since $f(x-1)=x^{2}-2 x+3=(x-1)^{2}+2$, then
$$
f(x)=x^{2}+2 \quad (x \leqslant -1).
$$

From $y=x^{2}+2$, we get $x^{2}=y-2$. Since $x \leqslant -1$, then $x=-\sqrt{y-2}$ and $y \geqslant 3$, so $f^{-1}(x)=-\sqrt{x-2} \quad (x \geqslant 3)$.

Therefore, the domain of $f(x)=x^{2}+2$ is $(-\infty, -1)$, and the range is $[3, +\infty]$,
the domain of $f^{-1}(x)=-\sqrt{x-2}$ is $[3, +\infty]$, and the range is $(-\infty, -1]$.
The graph is shown in Figure 4-8.
Figure 4-8