\(S=\left(x+y\right)^2\left(\frac{1}{x^2+y^2}+\frac{1}{xy}\right)=\left(x+y\right)^2\left(\frac{1}{x^2+y^2}+\frac{4}{4xy}\right)\)
\(S\ge\left(x+y\right)^2\frac{\left(1+2\right)^2}{x^2+y^2+4xy}=\frac{9\left(x+y\right)^2}{\left(x+y\right)^2+2xy}\ge\frac{9\left(x+y\right)^2}{\left(x+y\right)^2+\frac{\left(x+y\right)^2}{2}}=6\)
\(\Rightarrow S_{min}=6\) khi \(x=y\)