You don't need to know the value of S in the formula; in fact, you can't. Just call it S, and hope that it will cancel out of your final answer. You are given M for two quakes; use the formula to find I for them, and proceed from there.
(The variables "s" and "a" are just two values of M (magnitude), and have nothing to do with S in the formula. There is no variable A mentioned here.)
Please show work, so we can offer additional guidance.