An element of the left side is f(s) for some s∈S with f(s)∈T, exactly an element of T∩f(S). The second equality need not hold, even for a surjection: map {1,2} to a singleton and take S={1}, S′={2}. Then the image of the intersection is empty but the intersection of the images is not.