\(\left(a^3-3ab^2\right)^2=25\Leftrightarrow a^6-6a^4b^2+9a^2b^4=25\)
\(\left(b^3-3a^2b\right)^2=100\Leftrightarrow b^6-6a^2b^4+9a^4b^2=100\)
\(\Rightarrow a^6-6a^4b^2+9a^2b^4+b^6-6a^2b^4+9a^4b^2=125\)
\(\Leftrightarrow\left(a^2+b^2\right)^2=125\Leftrightarrow a^2+b^2=5\)
Thay a2+b2=5 vào S=2018a2+2018b2=2018(a2+b2)=2018.5=10090