<s>[INST] If $f\left(x-\frac{2}{x}\right) = \sqrt{x-1}$, then what is the value of $f'(1)$ 
Find $f'(1)$ if $$f\left(x-\frac{2}{x}\right) = \sqrt{x-1}$$ 

My attempt at the question:
Let $(x-\dfrac{2}{x})$ be $g(x)$
Then $$f(g(x)) = \sqrt{x-1} $$
Differentiating with respect to x: 
$$f'(g(x))\cdot g'(x) = \frac{1}{2\sqrt{x-1}} $$
Therefore
$$f'(g(x)) = \frac{1}{2(g'(x))\sqrt{x-1}}  $$
Finding the value of $x$ for which $g(x) = 1$ : $ x=( -1) , x=2$
But as $x\neq (-1)$, as $\sqrt{x-1}$ becomes indeterminant, substitute x = 2.
we get: $$f'(1) = \frac13 $$ 
Which is not the correct answer. The correct answer is supposedly $1$. Need some help as to why my method is wrong.
 [/INST] Let us assume ${\left(x-\frac{2}{x}\right) = 1, \text{the part inside}}$
It is found that $x = 2$ or $x = -1$
Taking the positive value of $x$
Therefore $f(1) = \sqrt {x-1}$ and 
Thus $$f'(1) = \frac {1}{2}\cdot(x-1)^{\frac{1}{2}-1},$$ $ \text{1 for the value inside the function}$
$$\Rightarrow \frac{1}{2}\cdot(x-1)^{\frac{-1}{2}}$$
Putting the positive value $2$, we get 
$f'(1) = \frac{1}{2}$
</s>