Let (Viβ)iβIβ be an open cover of f(X) in Y, so that I is a set, ViββTYβ for every iβI, and f(X)ββiβIβViβ.
For iβI put
Wiβ=fβ1(Viβ)={xβX:f(x)βViβ}.
Since f is continuous and ViββTYβ, we have WiββTXβ for every iβI, so (Wiβ)iβIβ is a family of subsets of X consisting of open sets.
This family covers X. Indeed, let xβX. Then f(x)βf(X), hence f(x)βViβ for some iβI, and therefore xβWiβ. Thus
XβiβIββWiβ.
By hypothesis X is compact, so there is a finite subset JβI with
XβjβJββWjβ.
We claim that f(X)ββjβJβVjβ. Let yβf(X), and pick xβX with y=f(x). Then xβWjβ for some jβJ, that is, f(x)βVjβ, so yβVjβ. This proves the claim, so (Vjβ)jβJβ is a subcover of f(X) indexed by a finite subset of I.
Since (Viβ)iβIβ was an arbitrary open cover of f(X) in Y, statement 2 of Compact Subset Criterion via Open Covers in the Ambient Space holds for the subset f(X)βY. By that theorem, f(X) is compact in Y.