<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] Differentiate both sides to get $f'(x-\frac{2}{x})(1+\frac{2}{x^2})=\frac{1}{2\sqrt{x-1}}$.  Then use $x=2$ to evaluate,  $f'(1)=\frac{1}{3}$.
</s>