More thorough
If $c \in f(A) \cap f(B)$ then $c \in f(A)$ and $c \in f(B)$. So there exisits a $a \in A$ s.t. $f(a) = c$ and there is a $b \in B$ s.t. $f(b) = c$ and $f(a) = f(b)=c$.
That's fine... but that's all it is.
Does it follow that $c \in f(A\cap B)$? In other words does it follow that there is a $d \in A\cap B$ such that $f(d) = c$? Not really, maybe we can find an $a \in A \cap B^c$ where $f(a) = c$ and a $b \in B \cap A^c$ where $f(a) = c$ but there are no $d \in A \cap B$ where $f(d) = c$. Is that possible.
Sure. take $f(x) = |x|$. Let $A = (-\infty, 0)$ and $B = (0, \infty)$ and $A \cap B = \emptyset$. If $a > 0$ then $-a \in A$ and $a = f(-a) \in f(A)$. $a = f(a) \in f(B)$. So $a \in f(A) \cap f(B)$ but $a \not \in f(A\cap B) = \emptyset$.
So $f(A) \cap f(B)$ need not be $ \subseteq f(A\cap B)$ .
But what if $f$ is injective? That is. If $f(a) = f(b) = c$ then it must be that $a = b$.
If $c \in f(A) \cap f(B)$ then $c \in f(A)$ and $c \in f(B)$. So there must exists an $a \in A$ such that $f(a) = c$. And there exists a $b \in B$ such that $f(b) = c$. But that means $a = b$ That means $a=b \in A \cap B$. So $c \in f(A \cap B)$.
So if $f$ is injective $f(A) \cap f(B) \subseteq f(A \cap B)$.
What if $f$ is surjective? Well, surjectivity really doesn't have anything to do with anything.
We can, after all, redefine $f:X \rightarrow Y$ as $g:X \rightarrow g(X)$ and $g$ is magically surjective.
But... A better example might be $f(x) = (x - 1)(x + 1)(x - 2)$. That's surjective. Let $A = (-2,0)$ so $f(-1) = 0 \in f(A)$ and let $B = (0, 2)$ and so $f(1) = 0 \in f(B)$. So $0 \in f(A) \cap f(B)$ but $A \cap B = \emptyset$ and, once again, $0 \not \in f(A \cap B) = \emptyset$.
So it doesn't need to hold for $f$ surjective.
If $f$ is a bijection then $f$ is injective and it has to hold.