Still struggling with proofs. This formula was presented as a given in my book and it wasn't intuitive to me at all, so I wanted to verify it as it seems images and inverse images play important roles in the material that follows. Even the examples I constructed didn't give me an intuitive understanding.
$X, Y, B \subset Y, f: X\to Y, f(A\subset X)-$ image of $A$ under $f, f^{-1}(B\subset Y) - $inverse image of $B$ under $f.$
I'll prove the equality by showing that $ff^{-1}(B) \subset B \cap f(X)$ and $ff^{-1}(B) \supset B \cap f(X)$. Since I'm not a LaTeX ninja, I'll write my proof in such a way that each statement takes into consideration the fact(s) immediately before it.
Let $y \in B \cap f(X).$
$y \in f(X) \implies \exists x^{*}:y=f(x^{*}).$
$y \in B \implies x^{*} \in f^{-1}(B) = \{x\in X:f(x)\in B\}.$
$ff^{-1}(B) = \{y\in Y: y=f(x)\space for\space some\space x\in f^{-1}(B)\} \implies y=f(x^{*}) \in ff^{-1}(B).$
So $ff^{-1}(B) \supset B\cap f(X).$
Let $y\in ff^{-1}(B).$
$ff^{-1}(B) = \{y\in Y: y=f(x)\space for\space some\space x\in f^{-1}(B)\} \implies \exists x^{*} \in f^{-1}(B):y=f(x^{*}).$
$f^{-1}(B)=\{x\in X:f(x)\in B\} \implies y=f(x^{*})\in B.$
$x^{*}\in X \land f(x^{*})=y \implies y\in f(X).$
$\implies y\in B\cap f(X) \implies ff^{-1}\subset B\cap f(X).$
So $ff^{-1}(B) = B\cap f(X).$
The last part ($\subset$) of the original formula follows directly, i.e.
Let $y\in B\cap f(X)$, which $\iff y\in B \land y\in f(X) \implies y\in B.\blacksquare$
I spent almost all day scratching my head until I finally came up with this proof and I'm not even sure it is good. Are you convinced of the truth of the formula? Is there a better way to show it?