Ta có : \(\left(a^2+b^2\right)^3=a^6+3a^4b^2+3a^2b^4+b^6\)
\(=\left(a^6-6a^4b^2+9a^2b^4\right)+\left(b^6-6a^2b^4+9a^4b^2\right)\)
\(=\left(a^3-3ab^2\right)^2+\left(b^3-3a^2b\right)^2\)
\(=5^2+10^2\)
\(=125\)
\(\Rightarrow S^3=125\)
\(\Rightarrow S=5\)