In set S, by switching from alternative a to alternative e you can make both individuals better off. Another way of saying this is to say that alternative e is pareto superior to alternative a. So a is not pareto optimal with respect to set S. However, there is no allocation in set T that you can move to from a such that one of the individuals is better off and the other is at least as well off as before. Therefore, a is pareto optimal with respect to T.