continuous image of a locally compact space is locally compact

I have found an answer ;

Let $y=f(x)\in Y $ then since $X$ is locally compact $x\in X$ has a compact neighborhood i.e there exists an open set $U $ contained in a compact set $V$ i.e. $x\in U\subset V$ then $f(x)\in f(U)\subset f(V)$

Now $f$ being open $f(U)$ is open in $Y$ and continuous image of a compact set being compact implies $f(V)$ is compact


The open set $f^{-1}(V)$ need not be contained in a compact set, so what you have to do is that using locally compactness of $X$ there is a open set $x \in U$ such that there is a compact set $C$ and $U \subset C$. Now take the intersection $U \cap f^{-1}(V)$ and take the image $f( U \cap f^{-1}(V)) \subset f(C)$ now $f$ being open the image is open and $f$ being continuous $f(C)$ is compact. Thus we get locally compactness. The openness condition is required.