Compact and neighborhood question a) if $A$ is closed and $x \not \in A$, then there is a number $d>0$ such that $|x-y|\geq d$ for all $y \in A$
b) if $A$ is closed and $B$ is compact, $A \cap B=\emptyset$, then there is a number $d>0$ such that $|x-y|\geq d$ for all $y \in A$ and $x \in B$.
c) give an example to show that part b) is false if neither $A$ nor $b$ is compact.
here is what I got.
a) Assume that $A$ is closed and $x \not \in A$, then $x$ is not a cluster point of $A$. by the definition of cluster point, $x$ is cluster point of $A$ if for all $d>0$ there exist a point $y \in A$, $y\in B_d (x)-\{x\}$, ie $|x-y|<d$. Since $x$ is not a cluster point of $A$, we just take the negatiob of the definition and have there exist a $d>0$ such that $|x-y|\geq d$ for all $y \in A$.
b) Assume that $A$ is closed and $B$ is compact, $A \cap B=\emptyset$, then $B\subset A^c$. let $y \in A$ and $x \in B$. Since $B$ is compact, $B$ is closed and bounded, so $x$ is cluster point of $B$ but not cluster point of $A$, let $d=\frac{2||x-y||}{3}$and then repeat the argument on part a). However, I still have the feeling that I miss something.
c) I come up with this example $A=[0,1)$ and $B=(1,2]$ but I don't think it satisfy the question.
 A: Your counterexample is incorrect since $A$ is not closed with the usual topology on $\mathbb{R}$. 
You can choose $A=\mathbb{R}_+\times\mathbb{R}_+\subset \mathbb{R}^2$ and $B=\{(x,\frac{1}{x})\in \mathbb{R}^2: x>0\}$. Then $A$ and $B$ is closed, $A\cap B=\emptyset$ but $B$ is not compact and we can find $d>0$ such that $\|x-y\|\geq d$ for all $x\in A, y\in B$.
A: The a) part seems alright. However, in part b) you proved that for all $y \in A$ and $x \in B$ there exists .... so actually the "$d$" you found depends on $x$ and $y$. From the original statement I understand you want to find a $d$ that works for all $x$ and $y$. It's not the same. 
Also, the counterexample would be incorrect since, as impartialale notes, you are not using closed sets. (Unless you are allowed to work with subspace topology ... which I doubt). 
.....
For part (b) try the following: Suppose (by cotradiction) that (b) doesn't hold. Then for every $d>0$ there exist $x_d \in B$ and $y_d \in B$ such that $|x_d-y_d|<d$. Make the following sequence $b_n = y_{1/n}$. Notice that since it is a sequence of elements of $B$ then it must have a converging subsequence. But the element it converges to can be in $A$ as well, because it is a limit point of $A$. There's the contradiction. 
A: b) For every $b\in B$ there is a $d_{b}>0$ such that $|b-a|\geq d_{b}$
for every $a\in A$. 
This can be reformulated as $N_{d_{b}}\left(b\right)\cap A=\emptyset$
where $N_{\varepsilon}\left(b\right):=\left\{ x\in X\mid|b-x|<\varepsilon\right\} $.
Note that the $N_{\frac{1}{2}d_{b}}\left(b\right)$ are open sets
with $B\subset\cup_{b\in B}N_{\frac{1}{2}d_{b}}\left(b\right)$. 
Then
$B\subset\cup_{s\in S}N_{\frac{1}{2}d_{s}}\left(s\right)$ for some
finite $S\subset B$ because $B$ is compact. 
Now let $d:=\min\left\{ d_{s}\mid s\in S\right\} $.
Then $d>0$ because $S$ is finite. 
It can be shown that $\left|a-b\right|\geq\frac{1}{2}d$
for every $a\in A$ and every $b\in B$. 
Suppose that to be not true
and let $a\in A$ and $b\in B$ with $\left|a-b\right|<\frac{1}{2}d$. 
Now let
$s\in S$ with $b\in N_{\frac{1}{2}d_{s}}\left(s\right)$, i.e. $|s-b|<\frac{1}{2}d_{s}$.
Then $|s-a|\leq|s-b|+|b-a|<\frac{1}{2}d_{s}+\frac{1}{2}d\leq d_{s}$
contradicting that $N_{d_{s}}\left(s\right)\cap A=\emptyset$. 
addendum:
c) Note that $A:=\left\{ \left(x,y\right)\mid x>0\wedge y\geq\frac{1}{\left|x\right|}\right\} $
and $B:=\left\{ \left(x,y\right)\mid x<0\wedge y\geq\frac{1}{\left|x\right|}\right\} $
are closed subsets of $\mathbb{R}^{2}$. 
For $d>0$ we have $\left(\frac{d}{3},\frac{3}{d}\right)\in A$,
$\left(-\frac{d}{3},\frac{3}{d}\right)\in B$ and $\left|\left(\frac{d}{3},\frac{3}{d}\right)-\left(-\frac{d}{3},\frac{3}{d}\right)\right|=\frac{2}{3}d<d$
showing that b) is not true.
