Let me add a calculational answer to this old question. Throughout I will implicitly assume that $x \in X$, $y \in Y$, $A, A_1, A_2 \subseteq X$ and $B \subseteq Y$. And I'm assuming that apart from set theory and logic, we're only allowed to use the following basic properties, which hold for any $A$, $B$, $x$, and $y$:
\begin{array}\\
(0) & y \in f[A] & \equiv & \langle \exists x : x \in A : f(x) = y \rangle \\
(1) & x \in f^{-1}[B] & \equiv & f(x) \in B \\
\end{array}
Using only these properties will make the proof a little longer, but as you will see it is mostly quite mechanical: expand the above two 'definitions' and do what comes naturally.
Looking at the shape of $$(2)\;\;\;f[A\cap f^{-1}[B]] \;\subseteq\; f[A] \cap B$$ the first thing that warrants investigation is the left hand side. Can we simplify it? Let's be bold, and look at the more general $f[A_1 \cap A_2]$: for any $y$, $A_1$ and $A_2$
\begin{align}
& y \in f[A_1 \cap A_2] \\
\equiv & \;\;\;\;\;\text{"basic property $(0)$"} \\
& \langle \exists x : x \in A_1 \cap A_2 : f(x) = y \rangle \\
\equiv & \;\;\;\;\;\text{"set theory: definition of $\cap$"} \\
& \langle \exists x : x \in A_1 \land x \in A_2 : f(x) = y \rangle \\
\Rightarrow & \;\;\;\;\;\text{"logic: weaken by splitting range of $\exists$"} \\
& \langle \exists x : x \in A_1 : f(x) = y \rangle \;\land\; \langle \exists x : x \in A_2 : f(x) = y \rangle \\
\equiv & \;\;\;\;\;\text{"basic property $(0)$, twice"} \\
& y \in f[A_1] \;\land\; y \in f[A_2] \\
\equiv & \;\;\;\;\;\text{"set theory: definition of $\cap$"} \\
& y \in f[A_1] \cap f[A_2] \\
\end{align}
So by the definition of $\;\subseteq\;$ we've proven that $$(3)\;\;f[A_1 \cap A_2] \;\subseteq\; f[A_1] \cap f[A_2]$$ for any $A_1$ and $A_2$. Using this, our first main step is, for any $A$ and $B$
\begin{align}
& f[A \cap f^{-1}[B]] \\
(*)\;\;\subseteq & \;\;\;\;\;\text{"by $(3)$"} \\
& f[A] \cap f[f^{-1}[B]] \\
\end{align}
That directly leads us into the next investigation: what can we say about $f[f^{-1}[B]]$? Well, for any $y$ and $B$
\begin{align}
& y \in f[f^{-1}[B]] \\
\equiv & \;\;\;\;\;\text{"basic property $(0)$"} \\
& \langle \exists x : x \in f^{-1}[B] : f(x) = y \rangle \\
\equiv & \;\;\;\;\;\text{"basic property $(1)$"} \\
& \langle \exists x : f(x) \in B : f(x) = y \rangle \\
\equiv & \;\;\;\;\;\text{"logic: use right hand part in left"} \\
& \langle \exists x : y \in B : f(x) = y \rangle \\
\equiv & \;\;\;\;\;\text{"logic: simplify: extract $y \in B$, which does not use $x$, out of $\exists$"} \\
& y \in B \;\land\; \langle \exists x : : f(x) = y \rangle \\
\equiv & \;\;\;\;\;\text{"make implicit assumption explicit -- to allow us to use $(0)$"} \\
& y \in B \;\land\; \langle \exists x : x \in X : f(x) = y \rangle \\
\equiv & \;\;\;\;\;\text{"basic property $(0)$; definition of $\cap$"} \\
& y \in B \cap f[X] \\
\end{align}
By set extensionality, we've now shown that $$(4)\;\;f[f^{-1}[B]] \;=\; B \cap f[X]$$ for any $B$.
Therefore we continue our main calculation, for any $A$ and $B$:
\begin{align}
& f[A] \cap f[f^{-1}[B]] \\
= & \;\;\;\;\;\text{"simplify $f[f^{-1}[\cdot]]$ using $(4)$"} \\
& f[A] \cap B \cap f[X] \\
(**)\;\;\subseteq & \;\;\;\;\;\text{"set theory -- working toward the right hand side of (2)"} \\
& f[A] \cap B \\
\end{align}
This completes the proof.
Note how the calculational approach helped us to discover two nice facts in this domain. Finally, here is a third. Looking at both places where this proof has an inequality, i.e., the steps marked $(*)$ and $(**)$, when will we have an equality, i.e., when will the more general $$f[A\cap f^{-1}[B]] \;=\; f[A] \cap B$$ hold? Clearly $(**)$ holds when $f[X] = Y$, i.e., when $f$ is surjective. And (as shown in, e.g., Please critique these proofs on function theorems) $(*)$ holds when $f$ is injective. Therefore we will have equality when $f$ is both, i.e., $f$ is a bijection.