This is the standard proof for compactness.
Cover each point with a ball and cover $x$ with a corresponding ball so the two ball do not intersect.
Now compactness gives a finite collection of balls.
Union of open sets is open and finite intersection of balls is open.
Thus we produce and open set that contains $x$ and on other point of $K$.