You have to prove that $f(f(A)) = f(T \cap (S \cup A)) = T \cap (S \cup (T \cap (S \cup A)))$ equals $f(A) = T \cap (S \cup A)$.
In order to prove this, you will need that the intersection is distributive with respect to the union of two sets and that the union is distributive with respect to the intersection of sets.
The following contains a spoiler, so if you want to try this yourself, do not look at the following box (before you have tried the computations yourself):
> \begin{align} T \cap (S \cup (T \cap (S \cup A))) &= T \cap (S \cup ((T \cap S) \cup (T \cap A))\\\ &= (T \cap S) \cup (T \cap (T \cap S)) \cup (T \cap (T \cap A))\\\ &= (T \cap S) \cup (T \cap S) \cup (T \cap A)\\\ &= (T \cap S) \cup (T \cap A)\\\ &= T \cap (S \cup A)\end{align}