Let $f: (X,T_x) \rightarrow (Y,T_y)$ be continuous map show that image of every closed set is closed if and only if for all $y \in Y$ and for all $U \in T_x$ such that $f^{-1}(y) \subset U$ there exist $V \in T_y$ such that $y \in V$ and $f^{-1}(V) \subset U$
I came up with a proof in both directions but I think I don't use the fact that $f$ is continuous so I am not sure if it is correct. Can someone check if it is okay?
From left to right
Take $y \in Y$, $U \in T_x$ such that $f^{-1}(y) \subset U$, then $X \setminus U$ is closed so $f(X \setminus U)$ is closed. Let $V=Y \setminus f(X \setminus U)$, V is open and $y \in V$. If there were $x$ such that $x \in f^{-1}(V)$ and $x \notin U$ then $f(x) \in V$ and $x \in X \setminus U$ so $f(x) \in Y$ and $f(x) \notin f(X \setminus U)$ and $f(x) \in f(X \setminus U)$, contracdiction so $f^{-1}(V) \subset U$.
From right to left
Let D be closed. I will show that $Y \setminus f(D)$ is open. Take $y \in Y \setminus f(D)$. For all $x \in f^{-1}(y) \subset X \setminus D$ there is set from basis $B_x$ such that $x \in B_x \subset X \setminus D$. $B:=\bigcup_{x \in f^{-1}(y)} B_x \subset X \setminus D$. $f^{-1}(y) \subset B \subset X \setminus D$, B is open so there exist $V \in T_y$ such that $y \in V$ and $f^{-1}(V) \subset B$. If there were $v \in V \cap f(D)$ then $f^{-1}(v) \subset f^{-1}(V) \subset B$ and $f^{-1}(v) \subset D$ but $B \cap D$ is empty so $V \subset Y \setminus f(D)$ so $Y \setminus f(D)$ open so $f(D)$ closed.
Your proof is correct (hence your characterization of closedness holds indeed even for non-continuous maps).
It can be shortened a little, mostly the second part:
From left to right
Take $y \in Y$ [...] and $y \in V$. Then, $f(f^{-1}(V))\subset V$ is disjoint from $f(X\setminus U),$ hence $f^{-1}(V)$ is disjoint from $X\setminus U,$ i.e. $f^{-1}(V)\subset U.$
From right to left
Let $D$ be closed [...] Take $y \in Y \setminus f(D)$. Then, $f^{-1}(y)\subset U:=X\setminus D$ (open) so there exists $V \in T_y$ such that $y \in V$ and $f^{-1}(V) \subset U$ i.e. $f^{-1}(V)$ is disjoint from $D.$ Then, $V$ is disjoint from $f(D)$ i.e. $V\subset Y \setminus f(D)$ [...] so $f(D)$ closed.
Or simply, the condition may be rewritten in terms of $F=X\setminus U$:
which is clearly equivalent to: for every closed $F\subset X$, $Y\setminus f(F)$ is open, i.e. $f(F)$ is closed.