S1 and S2 mentioned above are not equivalent. You can find a Kripke structure that distinguishes between the two formulas in the solution of the above mentioned exam.
Your argument "X=AX=AXA" is not correct. What is correct is "AXp = AXAp", but if there is just an X, you cannot simply add an A in front of it. AX phi is a state formula that holds on states, while X phi is a path formula that holds on paths. They cannot be equivalent.