Let $X$ and $Y$ be topological spaces.
Say a map $f: X \rightarrow Y$ has property $\mathcal{P}$ if:
"Given any subset $S \subset Y$ and any open $U$ containing $f^{-1}(S)$, there exists an open $V \supset S$ such that $f^{-1}(V) \subset U$."
To show: a surjective map $p: X \rightarrow Y$ is closed iff it has property $\mathcal{P}$.
Progress: I have shown the implication "$\Rightarrow$".
For the implication "$\Leftarrow$" I have tried this:
Let $A \subset X$ be closed. Let $S:= Y \setminus p(A)$. Then $p^{-1}(S) \subset X \setminus A$, which is open. We get a $V \supset S$ open with $p^{-1}(V) \subset X \setminus A$. Noting that map of sets $p \circ p^{-1}$ is the identity (by surjectivity) we obtain
$$Y \setminus p(X\setminus A) \subset Y \setminus V \subset p(A). $$
The set in the middle is closed, so to show $\overline{p(A)} \subset p(A)$ it suffices to have $p(A) \subset Y \setminus p(X \setminus A)$. But this requires injectivity.
Have I chosen the wrong $S$? Or is the condition actually not sufficient?
Many thanks for your help.