Example 4. Find the inverse function of $y=\pi-\arcsin (3-x)$, $(2 \leqslant x \leqslant 4)$.
Solve $\because-1 \leqslant 3-x \leqslant 1$
$$
\therefore \quad-\frac{\pi}{2} \leqslant-\arcsin (3-x) \leqslant \frac{\pi}{2} \text {, }
$$
$\therefore$ The range is $\frac{\pi}{2} \leqslant y=\pi-\arcsin (3-x)$
$$
\leqslant \frac{3 \pi}{2}
$$

Also, $y-\pi=-\arcsin (3-x)$.
From (1) and (2), we solve $x=3+\sin (y-\pi)$, which is $x=3-\sin y$.

Therefore, $y=3-\sin x, x \in\left[\begin{array}{c}\pi \\ 2\end{array}, \frac{3 \pi}{2}\right]$, is the required inverse function.