In the book "Special Techniques for Solving Integrals: Examples and Problems" by Khristo N. Boyadzhiev, I am given the integral $$F(x)= \int \frac{dx}{(x+3)\sqrt{3x-x^2 -2}}$$ as an example.
The example is as such,
\begin{align} \sqrt{-x^2+3x-2} &= t(x-1)\\ \implies x &= \frac{t^2 +2}{t^2 +1} \\ \implies \frac{dx}{dt} &= \frac{-2t}{(t^2 +1)^2} \\ \therefore F(x) &= \int \frac{dx}{(x+3)\sqrt{3x-x^2 -2}} \\ &= \int \frac{-2}{4t^2 +5} dt \\ &= -\frac{1}{\sqrt5}\arctan{\frac{2t}{\sqrt5}} +c \\ &= -\frac{1}{\sqrt5}\arctan{\frac{2\sqrt{2-x}}{\sqrt{5(x-1)}}} +c \end{align}
Then, the author said that setting $\sqrt{-(x-1)(x-2)} = t(x-2)$ would work too.
This would yield
$$x = \frac{2t^2 +1}{t^2 +1}, \quad \frac{dx}{dt} = \frac{2t}{(t^2 +1)^2}$$
So,
\begin{align} F(x) &= \int \frac{dx}{(x+3)\sqrt{3x-x^2 -2}} \\ &= \int -\frac{t^2 +1 }{t(5t^2 +4)} (t^2 +1) \frac{2t}{(t^2 +1)^2} dt \\ &= \int \frac{-2}{5t^2 +4} dt \\ &= -\frac{1}{\sqrt5}\arctan{\frac{t\sqrt5}{2}} +c \\ &= -\frac{1}{\sqrt5}\arctan{\frac{\sqrt{5(1-x)}}{2\sqrt{x-2}}} +c \end{align}
I checked on my gc, differentiating both answers, would yield different curves. However, the curves are the negative of each other. Initially I thought I miss a $-1$ somewhere, but I can't seem to find it.
Note that $x\in(1,2)$, otherwise the number inside the square root is negative. In your second case, \begin{align*} t&=\frac{\overbrace{\sqrt{-(x-1)(x-2)}}^{\text{positive}}}{\underbrace{x-2}_\text{negative}} =\frac{\sqrt{-(x-1)(x-2)}}{-\sqrt{(x-2)^2}} =-\sqrt{\frac{x-1}{2-x}}, \end{align*} you miss a $-1$ here.