\(a^2+b^2\ge\frac{\left(a+b\right)^2}{2}\Rightarrow\left(a+b\right)^2\le2\Rightarrow a+b\le\sqrt{2}\Rightarrow\frac{1}{a+b}\ge\frac{\sqrt{2}}{2}\)
\(T=2+a+b+\frac{1}{a}+\frac{1}{b}+\frac{a}{b}+\frac{b}{a}\ge2+a+b+\frac{4}{a+b}+\frac{a}{b}+\frac{b}{a}\)
\(T\ge2+a+b+\frac{2}{a+b}+\frac{a}{b}+\frac{b}{a}+\frac{2}{a+b}\)
\(T\ge2+2\sqrt{\frac{2\left(a+b\right)}{a+b}}+2\sqrt{\frac{ab}{ab}}+2.\frac{\sqrt{2}}{2}=4+3\sqrt{2}\)
\(\Rightarrow T_{min}=4+3\sqrt{2}\) khi \(a=b=\frac{1}{\sqrt{2}}\)