Let $X$ be a locally compact Hausdorff space (LCH). Let $\infty$ denote an element that is not in $X$ and $X^\ast=X\cup\{\infty\}$. Let $\mathcal{T}$ be the collection of all subsets of $X^\ast$ such that either (i) $U$ is an open subset of $X$, or (ii) $\infty\in U$ and $U^c=X\setminus U$ is a compact subset of $X$.
Proposition 4.36. If $X, X^\ast$ and $\mathcal T$ are LCH, the one-point compactification and the topology on $X^\ast$ respectively, then $(X^\ast,\mathcal{T})$ is compact Hausdorff and the inclusion map $i: X \to X^\ast$ is an embedding. Moreover, if $f\in C(X)$, then $f$ extends continuously to $X^\ast$ iff $f=g+c$ where $g\in C_0(X)$ and $c$ is a constant, in which case the continuous extension is given by $f(\infty)=c$.
Exercise. Prove Proposition 4.36. Also, show that if $X$ is Hausdorff but not locally compact, Proposition 4.36 remains valid except that $X^\ast$ is not Hausdorff.
My solution so far consists of showing $(X^\ast,\mathcal{T})$ is actually a topological space, that it is compact, that it is Hausdorff and then showing the equivalence in the last sentence of the proposition. Since I only require local compactness to show $X^\ast$ is Hausdorff, I reason that the proposition remains valid even if $X$ is not locally compact, though $X^\ast$ is then not implied to be Hausdorff. Or do I need to show something more here regarding the last sentence of the exercise?
The equivalence in the last sentence in the proposition, however, leaves me doubtful.
Moreover, if $f\in C(X)$, then $f$ extends continuously to $X^\ast$ iff $f=g+c$ where $g\in C_0(X)$ and $c$ is a constant, in which case the continuous extension is given by $f(\infty)=c$.
A function $f\in C_0(X)$ if for every $\epsilon>0$, the set $\{x:|f(x)|\geq\epsilon\}$ is compact. Inspired by this answer (I really struggle following the second equivalence in that answer), here's my attempt.
Attempt
Given that $f\in C(X)$ extends continuously to $X^\ast$, let $F:X^\ast\to\mathbb{R}$ be such an extension, with $F|X=f$ and $c:=F(\infty)$, where $c$ is some constant. We show $F-c\in C_0(X)$. Let $\epsilon>0$ be given and define $$U=\{y\in X^\ast:|F(y)-c|<\epsilon\}.$$We aim to show $X^\ast\setminus U$ is a compact subset of $X$. Notice that $U=h^{-1}((-\infty,\epsilon))$ for the function $h:X^\ast\to \mathbb{R}$ defined via $h(y)=|F(y)-c|$. Since $F$ is continuous, so is $h$ and thus $U$ is open in $X^\ast$. Therefore $K=X^\ast\setminus U$ is closed. But as $K$ is a closed subset of a compact set $X^\ast$, it is compact. And $\infty\notin K$ since $\infty\in U$ (indeed, $|F(\infty)-c|=0<\epsilon$). So given $\epsilon$, we found a $K\subset X$ compact such that $|F-c|<\epsilon$ on $X^\ast\setminus K$ (in particular on $X\setminus K$).
Conversely, if $f=g+c$ for $g\in C_0(X)$ and $c$ a constant such that $f(\infty)=c$, then we need to show $f$ is continuous. It suffices to check the preimages of open intervals of the form $(a,b)\subset\mathbb{R}$, since these form a base for the topology on $\mathbb{R}$. We have $f^{-1}((a,b))=g^{-1}((a,b))$ if $c\notin (a,b)$, which is open. If $c\in(a,b)$, then, $(a,b)=(a,c-\delta)\cup(c-\epsilon,c+\epsilon)\cup(c+\delta,b)$ for some $\epsilon,\delta>0$ small such that $a<c-\epsilon,a<c-\delta$ and $c+\epsilon<b,c+\delta<b$ and $\delta<\epsilon$. Since $g\in C_0(X)$, take a compact $K\subset X$ such that $|g|=|f-c|<\epsilon$ on $X\setminus K$, i.e. $f(x)\in (c-\epsilon,c+\epsilon)$ for $x\in X\setminus K$. Then \begin{align*}f^{-1}((a,b))&=f^{-1}((a,c-\delta))\cup f^{-1}((c-\epsilon,c+\epsilon))\cup f^{-1}((c+\delta,b))\\ &=g^{-1}((a,c-\delta))\cup (X\setminus K)\cup g^{-1}((c+\delta,b)) .\end{align*}This is a union of open sets in $X^\ast$ since $K$ is closed (compact subsets of Hausdorff spaces are closed) and $g$ continuous. So $f^{-1}((a,b))$ is open also when $c\in (a,b)$, proving continuity of $f$.
Any feedback to this attempt is appreciated very much. It became a bit lengthy, hence my doubt. Also the thing with introducing both $\epsilon$ and $\delta$ feels complicated, but I don't know how to do it differently.