Let $f(x)=x+\frac{1}{x}$ for all $x \geq 1$ and $g(x)=x^2+4x-6$. Find minimum of $g\circ f$.
My try:
The domain of $g\circ f$ is $[1,+\infty)$ and we have $$g(f(x))=\left(x+\frac{1}{x}\right)^2+4\left(x+\frac{1}{x}\right)-6.$$ At $x=-2$, the minimum of $g(f(x))=-10$. Is that right?
Since for positive numbers $a,b$ we have $a+b\geq 2\sqrt{ab}$ we have also $$f(x) \geq 2$$ (put $a=x$ and $b=1/x$) with equality iff $x=1$.
Now $g(x)= (x+2)^2-10$, so for $x\geq -2$ it is increasing and thus the minimum of $g$ is at $x=2$.
So the minimum of $g(f(x))$ is at $f(x)=2$ i.e. $x=1$.