By Compact Subset Criterion via Open Covers in the Ambient Space it suffices to show that for every open cover (Ui)i∈I of A in X there is a finite subset J⊆I with A⊆⋃j∈JUj.
So let (Ui)i∈I be an open cover of A in X.
Case I=∅. Then A⊆⋃i∈∅Ui=∅, so A=∅, and J=∅ is a finite subset of I with A⊆⋃j∈JUj=∅.
Case I=∅. Since A is closed in X, the complement X∖A belongs to T. For i∈I put
Wi=Ui∪(X∖A).
Each Wi is open: the set Pi={Ui, X∖A} is a set whose elements are subsets of X, and the family of subsets of X (Gp)p∈Pi defined by Gp=p consists of members of T and has union ⋃p∈PiGp=Ui∪(X∖A)=Wi, so Wi∈T by condition 2 of Topological Space.
The family (Wi)i∈I covers X. Indeed, let x∈X. If x∈A, then x∈Ui for some i∈I, because (Ui)i∈I covers A, and hence x∈Wi. If x∈/A, then x∈X∖A, and since I=∅ there is some i∈I, for which x∈Wi. Therefore X⊆⋃i∈IWi.
Since X is compact, there is a finite subset J⊆I with X⊆⋃j∈JWj.
Finally, A⊆⋃j∈JUj. Indeed, let x∈A. Then x∈X, so x∈Wj for some j∈J, that is, x∈Uj or x∈X∖A. The second alternative is impossible because x∈A, so x∈Uj with j∈J.
In both cases the required finite subset J exists, so A is compact in X.