
Andrew P. answered 09/27/21
PhD in Math with several years experience teaching discrete math
Recall, f(X) = {f(x) : x ∈ X} and if Y ⊆ B then f-1(Y) = {x ∈ A : f(x) ∈ Y} by definition. The statement in the question is true. Here is how to prove it.
First suppose y ∈ f(f-1(f(X))). Then y = f(x) for some x ∈ f-1(f(X)). Then by definition of this set, f(x) ∈ f(X), so y ∈ f(X). This proves f(f-1(f(X))) ⊆ f(X).
Conversely, suppose y ∈ f(X). Then y = f(x) for some x ∈ X. Since f(x) ∈ f(X), we get x ∈ f-1(f(X)), so
y ∈ f(f-1(f(X))), which proves the reverse inclusion, so the two sets are equal.