I know that the one-point compactification of $X,$ a topological space, is $Y=X\cup\{\infty\}$ and $\text{Top}_Y=\text{Top}_X\cup\{Y\setminus K: K $ compact in $ X \}.$ Question, is $Y$ compact?
My try, write $Y=(Y\setminus K)\cup K$ for $K$ compact in $X$. First component is open by definition, $K$ is compact so we can cover it by a finite number of open sets in $X,$ so open sets in $Y.$ Thus we cover $Y$ by a finite number of open sets.
Is this correct?
To prove compactness you have to start from an arbitrary open cover of the space. If you exhibit a finite open cover it is not enough (every space $X$ would be compact taking the finite open cover $U_1=X$).
To prove the one-point compactification $Y$ of $X$ is compact we start from fixing an oper cover $A_i$ of $Y$: now we have to find a finite subcover of $A_i$.
$A_i$ cover $Y$ so $\exists j$ such that $\infty \in A_j $. $\bigcup_{i \ne j} A_i$ is an open cover of $Y \setminus A_j$ which is compact (see below), let $A_1, ...,A_n$ finite subcover of $Y \setminus A_j$. We have that $A_j \cup A_1,...,A_n$ is a finite subcover of $Y$.
Added:
$Y \setminus A_j$ is compact because is an open set which contains $\infty$ so it is of the form $Y \setminus K=Y \cap K^c$ with $K$ compact in $X$. Now $Y \setminus A_j=Y \cap A_j^c=Y \cap Y^c \cap K=K $