22. On its own, [tex]\sin x[/tex] is not invertible because it's not one-to-one because it's periodic. For instance, we can always find more than one value of [tex]x[/tex] for which [tex]\sin x=0[/tex]; this happens when [tex]x=0,\pm\pi,\pm2\pi,\ldots[/tex].
But we can restrict the domain so that it can become invertible. If we only allow values of [tex]x[/tex] within [tex]-\dfrac\pi2\le x\le\dfrac\pi2[/tex], for example, then each [tex]x[/tex] will only be associated with a single value of [tex]\sin x[/tex]. This is how the standard inverse sine is defined. With [tex]-\dfrac\pi2\le x\le\dfrac\pi2[/tex] (restricted domain of sine), we guarantee that [tex]-1\le\sin x\le1[/tex] (range). So the domain of the inverse is [tex]-1\le x\le 1[/tex], and the range of the inverse is [tex]-\dfrac\pi2\le\sin^{-1}x\le\dfrac\pi2[/tex].
[tex]\dfrac{3\pi}4[/tex] is not in this restricted domain. But [tex]\sin\dfrac{3\pi}4[/tex] still exists as long as we take the standard domain (the entire real line), and [tex]\sin\dfrac{3\pi}4=\dfrac1{\sqrt2}[/tex]. But then [tex]\sin^{-1}\left(\sin\dfrac{3\pi}4\right)=\dfrac\pi4[/tex] because this is the only value of [tex]x[/tex] for which [tex]\sin^{-1}x=\dfrac1{\sqrt2}[/tex].
In short: [tex]\sin[/tex] and [tex]\sin^{-1}[/tex] are NOT inverses of one another, but rather one is an imperfect inverse of the other.
25. Not much to say about this:
[tex]g(x)=\cos x\implies g\left(\dfrac\pi2\right)=\cos\dfrac\pi2=0[/tex]
[tex]f(x)=\sin x\implies f\left(g\left(\dfrac\pi2\right)\right)=\sin\left(\cos\dfrac\pi2\right)=\sin0=0[/tex]