$\displaystyle \text{Let } f: X\rightarrow Y, \text{ where } X \text{ and } Y \text{ are sets.}$

$\displaystyle \text{Prove that }E \subseteq f^{-1}(f(E)) \text{ } \forall E \subseteq X.$

PROOF:$\displaystyle \text{Let } x \in E.$

$\displaystyle \text{Then, }y = f(x) \in f(E), \text{ so } x \in f^{-1}(f(E)).$

$\displaystyle \text{ Hence } E \subseteq f^{-1}(f(E))$

How do we know that $\displaystyle y = f(x) \in f(E)$?

And how does that mean that $\displaystyle x \in f^{-1}(f(E))$?

I guess I'm struggling with comprehending how a function is defined. We're using the book called Mathematical Analysis by Apostol and it's not an easy read for me.