Let $d$ be a metric on $X$. Show that for any subsets $A,B\subset X$:
(i) $d(A\cup B)\leq d(A)+d(B)+d(A,B)$
(ii) $d(\bar A)=d(A)$
I found this hard to prove because the diameter function is defined to be a supremum (least upper bound) and the metric space is not specific. (i) makes sense because the diameter of the union of two circles equals the sum of the diameter of each circle and the distance between them. For (ii), since $A\subset \bar A$, $d(A)\leq d(\bar A)$. And that's all of my thought on this problem.
Problem i)
$\forall x,x'\in A$ and $\forall y,y'\in B$, by the triangle inequality we have:
$$d(x,y)\leq d(x,x')+d(x',y')+d(y',y)$$
Since $d(A)\geq d(x,x')$ and $d(B)\geq d(y,y')$, we can say: $$d(x,y)\leq d(A)+d(x',y')+d(B)\qquad(*)$$ from which we deduce that $$\sup_{x\in A\; y\,\in B}d(x,y)\leq d(A)+d(x',y')+d(B)\qquad(**)$$ This follows from the fact that the supremum is not greater than any other upper bound of the collection $C=\{d(x,y)|x\in A,y\in B\}$ and the right hand side of $(*)$ is an upper bound for $C$;
On the other hand, $\forall \epsilon> 0$ $\exists x'\in A$ and $\exists y'\in B$ such that $d(x',y')<d(A,B)+\epsilon$. This follows from the fact that $d(A,B)$ is an infimum. And by inequality $(**)$: $$\sup_{x\in A\; y\,\in B} d(x,y)< d(A)+d(A,B)+d(B)+\epsilon;$$ Since $\epsilon$ is arbitrary, we have $$\sup_{x\in A\; y\,\in B} d(x,y)\leq d(A)+d(A,B)+d(B).$$ Now we are left wondering whether we can show $$\sup_{x\in A\; y\,\in B}d(x,y)=d(A\cup B):=\sup_{x,\,y\,\in\,A\cup B}d(x,y)$$
I'll leave that for you to show.
Problem ii)
You already showed that $d(A)\leq d(\overline{A})$. To show the reverse inequality, let's prove for all $\epsilon>0$ that $$d(\overline{A})\leq d(A)+\epsilon$$ this will finish our proof of ii) by taking the infimum over $\epsilon$.
Let $\epsilon>0$ be arbitrary. Let $x$ and $y\in\overline{A}$. Then there is an $x'\in A$ and a $y'\in A$ such that $$d(x,x')<\epsilon/2 \quad\text{ and }\quad d(y,y')<\epsilon/2$$ Just from the triangle inequality again, we have that $$d(x,y)\leq d(x,x')+d(x',y')+d(y',y)$$
Fixing our eyes on the middle term of that summand, we take the supremum over all elements of $A$. This tells us that $$d(x,y)\leq d(x,x')+d(A)+d(y',y)\leq\epsilon/2+d(A)+\epsilon/2=d(A)+\epsilon$$
Now we take the supremum over all elements of $\overline{A}$ to conclude that $$d(\overline{A})\leq d(A)+\epsilon$$
Since $\epsilon>0$ was arbitrary. We have $d(\overline{A})=d(A)$.