A theorem in my book says:
Suppose that
 )
are metric spaces. Define a function

. Then f is continuous iff
 )
is open in

for every open set

.
Proof in the book goes:
Assume that for each open

,
 )
is open in

.
Let

, then
 \in X_2 )
.
Then

,
, \epsilon )) )
is open in

since
, \epsilon ) )
is open in

, therefore f is continuous.
Q1: I understand why the set in the inverse is open, but how does that implies f is continuous? In other words, if I fill in the details, say:
Let

, then

, pick

, then whenever
 < \delta \ \ \ \ \ for \ x \in X_1 )
, I need to get
,f(x))) < \epsilon )
But how did the statement from above help me to get there?
---------------
Conversely, suppose that f is continuous, let U be open set in

.

, there exists
 \subset U )
,
and
such that
Implies that
 = \bigcup _{x \in f^{-1}(U) } B( \delta _x , x ) )
is open.
Q2: I understand that the open ball around y is in U since it is an open set, why I'm a bit unsure about how to get
 \subset f^{-1}(B( \epsilon _y , y )) )
, I'm sure it is because f is continuous. I know that continuous function map an open set to an open set, but do I know for sure it is true for the inverse?