relation between two groups and function's image Note: this is a homework problem, please don't reveal the answer yet, but I'd appreciate guides, as I've tried for 4 hours to solve this.
I'm trying to check whether for a function $f: A\rightarrow B$, and for $ C\subset A,  D \subset B$ the following is necessarily true of false (and therefore give an example that disproves it):
$f(C)\bigcap D = f(C\bigcap f^{-1}(D))$
in the previous exercise, I've proved that under the same conditions, the statement $f^{-1}(f(C)\bigcap D)) = C\bigcap f^{-1}(D) $
isn't necessarily true, specifically for the conditions: $C = \{1\}, D = \{2\}$,  and $f: A\rightarrow B$ defined as $f = \{(1,2),(2,2)\}$
Can I use the previous exercise I've already solved? I see it's very similar, yet I can't see how does it help me.
 A: We prove that they are equal. If one of the sets $f(C) \cap D$ or $f(C\cap f^{-1}(D))$ is empty, it is not too hard to show that the other is also empty; I'll leave this case to you. 
If neither is empty:
Take $b \in f(C) \cap D$. Then $b \in D$ and $b \in f(C)$. The latter means that there is $a \in C$ so that $f(a) = b$. But since $b \in D$, we have $f(a) \in D$ and so $a \in f^{-1}(D)$ [by the definition of $f^{-1}(D)$.] Since $a \in C$ and $a \in f^{-1}(D)$, we have $a \in C \cap f^{-1}(D)$. Thus $f(a) \in f(C\cap f^{-1}(D))$ and since $f(a) = b$, this shows $b \in f(C\cap f^{-1}(D))$. Hence $f(C) \cap D \subseteq f(C\cap f^{-1}(D)).$
Conversely, take $b \in f(C\cap f^{-1}(D)).$ Then there is $a \in C\cap f^{-1}(D)$ so that $f(a) = b$. For such $a$, we have $a \in C$ and $a \in f^{-1}(D).$ Since $a \in C$, we have $f(a) \in f(C)$. But $f(a) = b$ so $b \in f(C)$. Since $a \in f^{-1}(D)$, by definition, we have $f(a) \in D$. Thus since $f(a) = b$, we have $b \in D$. Hence $b \in f(C) \cap D$. This shows that $f(C\cap f^{-1}(D)) \subseteq f(C) \cap D$.
We conclude that $f(C\cap f^{-1}(D)) =f(C) \cap D$.
