I need to solve the following problem involving metric spaces:
Show in two different ways that a map $T$ from one metric space $(X, d_x)$ to another metric space $(Y, d_y)$ is continuous if and only if the inverse image of any closed set of $Y$ is a closed set of $X$.
Let's go to what I did.
First form: Let $F$ be nonempty and $F$ closed in $Y$. Then $B = Y \backslash F$ is opened in $Y$. Then the inverse image $T^{-1} (B)$ is opened in $X$. Thus, the inverse image $T ^ {-1} (F)$ is closed in $X$ as we wanted.
Second form: Suppose by absurdity that there is some closed $F$ contained in $Y$ such that $T^{-1} (F)$ is not closed in $X$. Then there is some sequence of points $x_n \in T^{-1} (F)$ with $x_n$ converging to $x$ and $x \notin T^{-1} (F)$. Now, we know that $T_n$ are elements of $F$ and using the continuity of $T$, it follows that $T_n$ converges to $T_x$. This is an absurd.
$\color{blue}{\textrm{The converse:}}$
First Form: Suppose by absurdity that $T$ is not continuous. Then there is some open $B \in Y$ such that $T^{-1} (B)$ is not open in $X$. For this $B$, we know that $F = Y \backslash B$ is closed in $Y$. Then by hypothesis $T^{-1} (F)$ is closed in $X$. Then $T^{-1} (B)$ is opened (which is an absurd).
Second Form: I need your help! I've tried some ways and I could not to prove another one. I have searched here and internet some solutions about this statement, but nothing has two differents ways of proof.