In order for there to be a composition of functions $\displaystyle \displaystyle \begin{align*} f \circ g(x) = f \left( g(x) \right) \end{align*}$, the range of the second function needs to be completely contained in the implied domain of the first function (so that all these values can be inserted into the first function).
If this is the case, then the domain of your composition will be the same as the domain as the second function. If not, you will need to determine the largest possible domain for your second function so that the range WILL be completely contained in the implied domain of the first function.
I don't think I would square both sides. Rather, look at $\displaystyle sin(x)\ge 0$ and $\displaystyle sin(x)< 0$ separately. Of course, $\displaystyle sin(x)\ge 0$ for $\displaystyle 2n\pi\le x\le (2n+1)\pi$ for any integer n, $\displaystyle sin(x)< 0$ for $\displaystyle (2n-1)\pi< x< 2n\pi$ for any integer n.
If $\displaystyle sin(x)\ge 0$, |sin(x)|= sin(x) so the argument of the square root is 3sin(x)- sin(x)- 2= 2 sin(x)- 2 which will be less than 0 if and only if sin(x)< 1 which is true for all such x except multiples of $\displaystyle \pi$.
If $\displaystyle sin(x)< 0$, |sin(x)|= -sin(x) so the argument of the square root is 3sin(x)+ sin(x)- 2= 4sin(x)- 2 which will be less than 0 if and only if sin(x)< 1/2 which is true for all x such that sin(x)< 0[/tex].
Notice that I have looked at values of x such that the argument of the square root is NEGATIVE- where the function does NOT exist. That is, the domain of this function is all real numbers except $\displaystyle (2n-1)\pi\le x\le 2n\pi$.
@ All, Have a look at this webpage.