Let $(X,\tau)$ be a first countable Hausdorff space, and $S \subseteq X$.
$S$ is closed iff every $S \cap T$ is closed, where $T$ is compact.
The only if direction is trivial since every compact subset of $X$ is closed, but I'm stuck on the converse. I tried the following:
Suppose that every $S \cap T$ is closed, but $S$ is not closed. Let $x \in S^- \setminus S$. Let $\mathcal{N} \subseteq \tau$ be a countable neighbourhood base at $x$. Then I somehow need to show the existence of $x$ makes $S \cap T$ not closed.
Suppose $x\in \bar S.$ Since $X$ is first countable, there is a sequence $\{x_n\}_{n\in\mathbb N}$ in $S$ which converges to $x.$ Then the set $T=\{x\}\cup\{x_n:n\in\mathbb N\}$ is compact. Since $x_n\in S\cap T$ for each $n\in\mathbb N,$ and since $S\cap T$ is closed, it follows that $x\in S.$