The proof is straightforward, really, but you need a lot of small arguments (mostly by contradiction, because we're dealing with complements) to prove all required inclusions via pointwise arguments. A full proof by "set algebra" could also be done, but I prefer this, as it's easier to reconstruct from memory.
If $f:X \to Y$ is closed and $A \subseteq Y$ and $f^{-1}[A] \subseteq V$ then
$V$ is open, so $X\setminus V$ is closed in $X$, hence $f[X\setminus V]$ is closed in $Y$ (as $f$ is closed) and so $U:= Y\setminus f[X\setminus V]$ is open in $Y$.
It remains to verify:
$A \subseteq U$: Let $y \in A$. Suppose, for a contradiction, that $y \notin U$; this means (by the definition of $U$) that $y \in f[X\setminus V]$ so there exists some $x \in X\setminus V$ such that $f(x)=y$. But then $x \in f^{-1}[A]$ (as $y=f(x)$ and $y \in A$) so $x \in V$ (as $f^{-1}[A] \subseteq V$) but this contradicts $x \in X\setminus V$. This contradiction thus shows that $y \in U$ and the inclusion has been shown.
$f^{-1}[U] \subseteq V$: Let $x \in f^{-1}[U]$ and suppose, for a contradiction, that $x \notin V$. Then $x \in X\setminus V$, and $f(x) \in f[X\setminus V]$ and so $f(x) \notin U$, contradicting that $x \in f^{-1}[U]$. So $x \in V$ and again we have the required inclusion.
This shows one direction.
Now suppose $f$ obeys the condition with $A,V$ and $U$ and we will show that $f$ is closed. So let $C \subseteq X$ be closed and we want to show that $f[C]$ is closed in $Y$. So let $y \in Y$ be a point not in $f[C]$. Then $f^{-1}[\{y\}] \subseteq X\setminus C$ (otherwise some $x \in C \cap f^{-1}[\{y\}]$ exists and then $f(x)=y$ and $f(x) \in f[C]$ contradicting that $y \notin f[C]$). Now apply the condition for $A=\{y\}$ and $V=X\setminus C$ (which is open as $C$ is closed) and so we have some $U$ open in $Y$ such that $\{y\} \subseteq U$, or equivalently $y \in U$, and also $f^{-1}[U] \subseteq V$. The latter implies that $U \cap f[C] = \emptyset$: if not we have $y' = f(x')$ with $x' \in C$ and $y' \in U$, but then $x' \in f^{-1}[U]$ and so $x' \in V=X\setminus C$, so $x' \notin C$. Contradiction, and so indeed we have found an open neighbourhood $U$ of $y$ such that $U \cap f[C] = \emptyset$, showing that $f[C]$ is closed and so $f$ is a closed map.