Looks extremely difficult! :(
in the second part how can values of a1 and a2 maximize E(S(a1,a2))? i mean a1 and a2 r the variables in the random variable na? or was it supposed to be values of S1 and S2?
my answer is very weird, E value comes out to be 50 - a1^2/ 200 + a1/2 - 1/2 a1* a2^2 / 100^2 +a1a2/200,
and to maximise expected value a1 should be 62.5 and a2 = 50
we need to find E(s)which is equal to summation pisi,
there are three cases , so in first case, when S1>a1, summation pisi will be
integration 1/100 * x dx,from a1 to 100 ( for all the values of x>ai value of S(a1,a2) =S1=x)
in second case ,
summation pisi would be
double integration ( a2 to 100) and from 0 to a1 1/100* 1/100*y dx.dy where y is the value of S2 and also S(a1,a2),
[ x is less than a1, and greater than a2]
similar u can integrate for the third case ,
by adding all the three pisi , u will expected value of S(ai,a2).
I have written in a very complicated way , i hope this helps