prove using the definition of compactness [duplicate]

If A is compact and B is closed then A Intersection B is compact.
I tried to solve it using the fact that compact set is closed and bounded but the problem here they did not tell us in which topology is compact or if its compact in R.

If $$A$$ is compact and $$B$$ is closed, then because $$A$$ is closed, $$A\cap B\subset A$$ also is closed. Therefore, it suffices to show that closed subsets of compact sets are compact.
Let $$X$$ be a compact set, $$V\subset X$$ a closed subset. Any open cover $$\{U_i\}_{i\in I}$$ of $$V$$ can be extended to an open cover of $$X$$, e.g. by taking $$X\backslash V$$ and all the $$U_i$$. Since $$X$$ is compact, there is a finite subset $$J\subset I$$ such that $$X = \bigcup_{j\in J} U_j \cup X\backslash V$$. Then
$$V = \bigcup_{j\in J} V\cap U_j$$
is a finite subcover. Therefore, $$V$$ is also compact.