Distance and compact sets 
EDIT
This was posted a year ago, I feel like presenting an alternative solution(s).
(a) 
(i) Since $A \cap B = \phi$, we have $a \notin B$. Thus for each $b \in B$, we have $\| a -b\| > 0$. Consider the set $C = \{\|a-b\| : a \in A, b \in B\}$. Obvious $C$ is bounded below by $0$. Therefore by the glb property we have $0 <\inf C  $
(ii) The one uses the fact that $B$ is closed and using the definition of $\inf$. Applying the Squeeze Theorem yields $a \in B$, but we have a contradiction. 
 A: You’re getting off on the wrong foot right from the start: it is not true that $d(A,B)=0$ iff $A=B$. For example, let $A=\{0\}$ and $B=[0,1]$ in $\Bbb R$; then
$$\begin{align*}
d(A,B)&=\inf\{|a-b|:a\in A\text{ and }b\in B\}\\
&=\inf\{|b|:b\in[0,1]\}\\
&=0\;,
\end{align*}$$
but it’s certainly not true that $\{a\}=[0,1]$.
Similarly, for (a) you should have
$$d(\{a\},B)=\inf\{\|a-b\|:b\in B\}\;.$$ This is $0$ iff for each $\epsilon>0$ there is a $b_\epsilon\in B$ such that $\|a-b_\epsilon\|<\epsilon$. Thus, if $d(\{a\},B)=0$, there is a sequence in $B$ converging to $a$ (why?), and since $B$ is closed, this implies that $a\in B$. Since we were told that $\{a\}\cap B=\varnothing$, this is impossible, and $d(\{a\},B)\ne 0$. Since the distance function takes only non-negative values, this means that $d(\{a\},B)>0$.
You can use (a) to help you prove (b). You know from (a) that $d(\{a\},B)>0$ for each $a\in A$. Now suppose that $d(A,B)=0$. Show that for each $\epsilon>0$ there must be some $a_\epsilon\in A$ such that $d(\{a\},B)<\epsilon$. Conclude that there is a sequence $\sigma=\langle a_k:k\in\Bbb Z^+\rangle$ in $A$ such that $d(\{a_k\},B)<\frac1k$ for each $k\in\Bbb Z^+$. $A$ is compact, so $\sigma$ has a convergent subsequence. Show that the limit of this subsequence is in $A\cap B$, thereby getting a contradiction and showing that $d(A,B)$ must be positive.
From (b) you know that the two sets in (c) cannot be compact. They are closed, however, so they cannot be bounded. Look for two unbounded closed sets that get closer and closer together but never meet.
Added in response to edit of question: You write:

Assume $d(A,B)=0$, then $\forall\epsilon>0,\exists a_\epsilon\in A$ such that $|a−a_\epsilon|<\epsilon$.

This makes no sense, I’m afraid. First, $a$ comes out of nowhere. What is it? Where did it come from? What properties does it have? Secondly, you’ve asserted the existence of the points $a_\epsilon$, but you’ve given no justification for the assertion. Start over, this time paying a bit more attention to the suggestion.

Suppose that $d(A,B)=0$. By definition
$$\begin{align*}
d(A,B)&=\inf\{|a-b|:a\in A\text{ and }b\in B\}\\
&\overset{*}=\inf_{a\in A}\inf\{|a-b|:b\in B\}\\
&=\inf_{a\in A}d(\{a\},B)\;.
\end{align*}$$
This means that for each $\epsilon>0$ there is an $a_\epsilon\in A$ such that $d(\{a\},B)<\epsilon$. (Why, and why is the starred step above justified?) Now consider the sequence $\langle a_{1/k}:k\in\Bbb Z^+\rangle$; $A$ is compact, so this sequence has a convergent subsequence $\langle a_{1/n_k}:k\in\Bbb Z^+\rangle$. Let $a$ be the limit of this subsequence; then $a\in A$ (why?). On the other hand, for each $k\in\Bbb Z^+$ we know that $d(\{a_{1/n_k}\},B)<\frac1{n_k}$, so there is a point $b_k\in B$ such that $d(a_{1/n_k},b_k)<\frac1{n_k}$. Prove that the sequence $\langle b_k:k\in\Bbb Z^+\rangle$ converges to $a$, and use the fact that $B$ is closed to conclude that $a\in B$. This is a contradiction; what hypothesis does it contradict?

A: Here are some hints:
a) Your statement that $d(A,B) = 0$ iff $A = B$ is false for sets $A$ and $B$; this is true for points. For instance, $A = \{1,3\}$ and $B = \{1,4\}$ also satisfy $d(A,B) = 0$ but the sets $A,B$ are not equal.
However, for $A = \{a\}$ and $B$ closed you know that  $a\not\in B$ and hence there is an open ball around $a$ not intersecting $B$; you can use the triangle inequality here to show (a).
b) Since $A$ is compact, every point in $A$ has an open neighbourhood disjoint from $B$. How can you use the compactness property and part (a) now?
c) From (b) you know that neither set can be compact. Try playing with sequences...
A: a. Suppose that $d(A,B)=0$. Then $\forall n \in \mathbb{N} $ exist $b_n \in B$ s.t. $d(a,b_n)<\frac{1}{n}$. The sequence $(b_n)$ has limit $a$. Since B is closed $a \in B$. Contradiction. So $d(A,B)>0$.
b . It is an easy exercise to show that $d(A,B)=\inf{\{d(a,B):a \in A\}}$. So suppose that $d(A,B)=0$. Then $\forall n \in \mathbb{N} $ exist $a_n \in A$ s.t. $d(a_n,B)<\frac{1}{n}$. Since A is compact the sequence $a_n$ has a convergence subsequence $a_{k_n}$. Then $a_{k_n} \to a$ for some $a \in A$. Then $d(a,B)=0$. Contradiction from part a.
c. Take $A=\{(x,0):x \in \mathbb{R}\}$ and $B$ the graph of the function $\frac{1}{x}$.
