Defining continuity of a function using metric spaces and open sets. I have just been introduced to metric spaces. 
A function $f: M \rightarrow N$ between metric spaces $(M,d_M)$ and $(N,d_N)$ is continuous at $x$ if 
$\forall$ $\epsilon >0$ $\exists \delta >0$ s.t $\forall y $ s.t $d_M(x,y)<\delta$
$d_N(f(x),f(y))<\epsilon$
In terms of open sets this can be written as $f$ is continuous at $x$ if 
$\forall$ $\epsilon >0$ $\exists \delta >0$ s.t $f(B_M(x,\delta)) \subseteq B_N(f(x), \epsilon)$.
The problem I have now is why we can now do:
$\forall$ $\epsilon >0$ $\exists \delta >0$ s.t $(B_M(x,\delta)) \subseteq f^{-1}(B_N(f(x), \epsilon))$. 
1) Why is it we can do this- how do we know that $f$ is even invertible?
2) Why can we deduce:
$f$ is cont at $x$ if whenever $f(x)$ is an interior point of $U \subseteq N$ , $x$ is an interior point of $f^{-1}(U) \subseteq M$  
 A: Note that to define inverse images of subsets $B \subseteq N$, $f$ need not be invertible, one defines for any $B \subseteq N$:
$$ f^{-1}[B] := \{x \in M : f(x) \in B \} $$
and calls it the inverse image of $B$ under $f$. One has for subsets $A \subseteq M$, $B \subseteq N$:
\begin{align*}
   f[A] \subseteq B &\iff \forall x \in A: f(x) \in B\\
                    &\iff \forall x \in A: x \in f^{-1}[B]\\
                    &\iff A \subseteq f^{-1}[B]
\end{align*}
That is 
$$ f\bigl[B_M(x,\delta)\bigr] \subseteq B_N\bigl(f(x), \epsilon)\bigr)
  \iff B_M(x,\delta) \subseteq f^{-1}\Bigl[B_N\bigl(f(x), \epsilon)\bigr)\Bigr] $$
For (2) let $\epsilon > 0$, then $f(x)$ is an interior point of $U := B_M(f(x), \epsilon)$, hence $x$ is interior in $f^{-1}[U]$, so there is $\delta > 0$ with $B_N(x,\delta) \subseteq f^{-1}[B_M(f(x),\epsilon)]$, and that implies continuity by the above.

Addendum: To answer the point highlighted in Arcane's comment, an addition: Note that we have two statements, namely:

(1) For every $\epsilon > 0$, there is an $\delta > 0$ such that $B_M(x, \delta) \subseteq f^{-1}\bigl[B_N(f(x), \epsilon)\bigr]$.
  (2) For every $U$ such that $f(x)$ is an interior point of $U$, $x$ is an interior point of $f^{-1}[U]$.

(1) talks about the specific open sets, the balls, (2) about general subsets. Note first that being interior to $U$, means that there is a ball around $f(x)$ such that $B_N(f(x), \epsilon) \subseteq U$, and by monotonicity of taking inverse images, this implies $f^{-1}[B_N(f(x), \epsilon)] \subseteq f^{-1}[U]$, and (2) that in the above proof of (2) $\implies$ (1) we used the general assumption (for all subsets $U$ ...) for the specific $U := B_N(f(x), \epsilon)$. When we prove now the other direction, we must use the above statement about monotonicity to get from a general $U$ to an open ball we know something about:
Suppose (1) holds. To prove (2), let $U$ be an subset of $N$ such that $f(x)$ is an interior point of $U$. Then there is $\epsilon > 0$ such that $B_N(f(x),\epsilon) \subseteq U$ (definition of being interior point). Monotonicity gives 
$$f^{-1}\bigl[B_N(f(x), \epsilon)\bigr] \subseteq f^{-1}[U]$$
and by (1) there is an $\delta > 0$ such that 
$$B_M(x, \delta) \subseteq f^{-1}\bigl[B_N(f(x), \epsilon)\bigr] \subseteq f^{-1}[U]$$
hence $B_M(x, \delta) \subseteq f^{-1}[U]$, which means that $x$ is interior in $f^{-1}[U]$. So (2) holds.
So (1) and (2) equivalently describe $f$'s continuity at a point $x \in M$. The more general description has its advantaganges, for one can define continuity in even more general spaces then metric spaces, where one does not have balls (as one does not have distances), but can talk about interior points (these spaces are called topological spaces).
A: 1) $f$ does not need to have an inverse, here $f^{-1}(V)=\{x \in M, f(x) \in V \subset N\}$. It is just a question of notation.
2) This is a particular case of a more general definition of continuity, $f$ is continuous if for every open set ($V \subset N$), the preimage of that open set ($f^{-1}(V) \subset M$) is also an open set. If the hypothesis holds, you can consider an open ball centered at $f^{-1}(x)$ contained in $f^{-1}(U)$ and applying $f$ to that ball you get the  desired result.
