Without assuming that $X$ is Hausdorff (and using the definition of local compactness given) the result is not true.
Let $X$ be any set with at least two elements, and consider the trivial (anti-discrete) topology on $X$. Clearly this space has the property that the nonempty open sets with compact closures form a base (indeed, there is only one nonempty open set, and it's closure is clearly compact), and so this space is locally compact. Note, too, that any nonempty proper $M \subseteq X$ is also locally compact (another anti-discrete space), but will not be the intersection of an open and a closed subset of $X$.
However, the result does follow if we assume that $X$ is Hausdorff. (Then local compactness is equivalent to every point having an open neighbourhood with compact closure.)
To wit: given $x \in M$, let $V_x$ be a neighbourhood of $x$ in $M$ such that $\mathrm{cl}_M ( V_x ) = \overline{V_x} \cap M$ is compact. Now $\overline{V_x} \cap M$ is also a compact subset of $X$, so by Hausdorffness $\overline{V_x} \cap M$ is closed (in $X$). Fix an open $W_x \subseteq X$ such that $W_x \cap M = V_x$. Clearly we have that $$\overline{ W_x \cap M } \cap M = \mathrm{cl}_M (V_x).$$ Note, now, that as $W_x \cap M \subseteq \overline{ W_x \cap M } \cap M$, we have that
$$
W_x \cap \overline{M}
\subseteq \overline{ W_x \cap \overline{M} }
= \overline{ W_x \cap M }
\subseteq \overline{ W_x \cap M } \cap M
\subseteq M,
$$
(and clearly $x \in W_x \cap \overline{M}$).
Setting $U = \bigcup_{x \in M} W_x$, it follows that $U$ is open in $X$, and $M = U \cap \overline{M}$, as desired.
There's a mistake:
so we obtain an open cover $K^c \cup V$ of $K$, and because $K$ is compact
You don't know that $K$ is compact. You are trying to prove that $K$ is compact. You only know that $K$ is closed and $F$ is compact. In fact, the mere fact that you don't use $F$ anywhere in your proof should be cause for alarm.
Also, you are confusing covers (which are collections of sets) with their coverage (i.e., union of their component sets).
So, when you write that you take a finite subcover $\Omega$ of $K$, you then say that $K\subset \Omega$, which is not true. What is true is that $$K\subset\bigcup_{A\in\Omega} A$$ which is different!
I advise you to restart the proof again, and here's a couple points to start you off:
- You need to prove that $K$ is compact
- That means you need to prove every open cover of $K$ has a finite subcover
- That means you take some cover, $\mathcal V$, such that $K$ is covered by $\mathcal V$ (you were on point until here).
- Now you need to prove there exists a finite subcover of $\mathcal V$.
And a little hint:
- You know $F$ is compact, so any open cover of $F$ has a finite subcover.
- Can you add one more set to $\mathcal V$ such that the resulting cover will be a cover for $F$?
Aftert your edit:
You still have that misstake of cover vs coverage. So, instead of saying that $K^c\cup V$ is an open cover of $F$, you should say that $\{K^c\}\cup \{V_a\}$ is an open cover of $F$.
I am even more concerned that I think you are confused a bit about what an open cover is. When you say
Now, consider the union $K^c \cup V$. Since $K \subset V$, it follows that $X =K^c \cup K \subset K^c \cup V$, meaning that $X = K^c \cup V$, so $F \subset K^c \cup V$ and $X$ is an open subset of itself
I'm thinking "yes, all he said is true, but it's irrelevant".
An open cover is a collection of open sets, not a collection of sets whose union is open. So, you don't need to prove that $$K^c\cup V$$ is open (even though it is), you need to prove that every element of $$\{K^c\}\cup\{V_a\}$$ is open (which is not hard, it's just that if you don't do that, the proof is incorrect).
Best Answer
There is a minor flaw in your proof: if $U_x$ is an open rectangle of side length $\frac{d}{2}$ in $\mathbb{R}^n$, then the distance from its center $x$ to a corner is $\frac{d}{4} \sqrt{n}$, which for large enough $n$ will be greater than $d$. In that case you can no longer conclude that $U_x \subset U$.
This is easily fixed by letting $U_x$ be an open ball of radius $\frac{d}{2}$ instead of a rectangle.
Otherwise the proof looks fine.