I have a question about the last part of this proof (bold letters).
Why from the empty intersection between $X-A$ and $A$ and that each set $U_a$ contains only one point of $A$, can we conclude that the set $A$ must be finite?
Compactness implies limit point compactness.
Let $X$ be a compact space. Given a subset $A$ of $X$, we wish to prove that if $A$ is infinite, then $A$ has a limit point. We prove the contrapositive - if $A$ has no limit point, then $A$ must be finite. Suppose $A$ has no limit point. Then $A$ contains all its limit points, so that $A$ is closed.
Furthermore, for each $a\in A$ we can choose a neighborhood $U_a$ of $a$ such that $U_a$ intersects A in the point $a$ alone. The space $X$ is covered by the open set $X - A$ and the open sets $U_a$; being compact, it can be covered by finitely many of these sets.
Since $X - A$ does not intersect $A$, and each set $U_a$ contains only one point of $A$, the set $A$ must be finite.