I want to solve this problem:
Let $X$ be a totally disconnected compact metric space, and let $\mathcal{A}$ be a clopen cover of $X,$ and fix $r>0$.
(a) Show that there is a cover $\mathcal{B}$ having all five of the properties:
I. each member of $\mathcal{B}$ is clopen,
each member of $\mathcal{B}$ has diameter at most $r,$
$\mathcal{B}$ refines $\mathcal{A},$
$\mathcal{B}$ is a finite cover, and
$\mathcal{B}$ is a disjoint cover.
I got a hint to show that if $U \in \mathcal{A}$, then $U$ is compact.
And also I proved (with the very great help of many people on this site) the following question :
Let $X$ be a compact metric space that is totally disconnected, and let $\epsilon > 0.$\
(a) Show that $X$ has a finite cover $\mathcal{A}$ clopen sets with diameter at most $\epsilon.$\
(b) Show that there is a clopen cover $\mathcal{B}$ such that $\mathcal{A}$ refines $\mathcal{B}$ and distinct numbers of $\mathcal{B}$ are disjoint.
And we know the following definition:
DEFINITION.
Suppose $\mathcal{A}$ and $\mathcal{B}$ are two covers of $X.$ We say that $\mathcal{B}$ refines $\mathcal{A}$ if each member of $\mathcal{B}$ is contained in some member of $\mathcal{A}.$ We say that $\mathcal{B}$ strictly refines $\mathcal{A}$ if each member of $\mathcal{B}$ is a proper subset of some member of $\mathcal{A}.$ if $\mathcal{B}$ strictly refines $\mathcal{A},$ we write $\mathcal{A} < \mathcal{B}.$
Definition:
A topological space $X$ is totally disconnected if for any two distinct points $x,y \in X,$ there is a separation $X = U \cup V$ of $X$ with $x \in U $ and $y \in V.$
Definition:
A separation of a space is a cts. function $f: X \rightarrow \{0,1\}$ with $\{0,1\}$ has the discrete topology.
In terms of open sets, a separation of $X$ is an expression $X = U \cup V$ where $U \cap V = \emptyset $ and $U,V$ are both open in $X.$
So, how can all of the above help me in answering the first problem I stated above? Could anyone help me, please?
You've got all the ingredients now, haven't you?
For each $x \in X$, pick $A_x \in \mathcal{A}$ and pick an open ball $B_x:=B(x, \delta_x)$ of diameter $< r$ (take $0< \delta_x < \frac{r}{2}$) such that $B_x \subseteq A_x$.
(this can be done as $\mathcal{A}$ is an open cover of a metric space, nothing special). As $X$ is totally disconnected, we can do better and by this problem we have a clopen $U_x$ such that $$x \in U_x \subseteq B_x \subseteq A_x\tag{1}$$
As $X$ is compact and $\{U_x:x \in X\}$ is an open cover of $X$, finitely many $U_x, x \in F$, $F\subseteq X$ finite, also cover $X$.
Now, $\mathcal{A}' = \{U_x: x \in F\}$ is a finite clopen cover of $X$ that refines $\mathcal{A}$ by $(1)$, and such that $\operatorname{diam}(A)< r$ for all $A \in \mathcal{A}'$.
Now construct $\mathcal{B}$ from $\mathcal{A}'$ in this way and $\mathcal{B}$ is a disjoint and clopen cover, which refines $\mathcal{A}'$ so refines $\mathcal{A}$ and also has sets with $\operatorname{diam}(B)< r$ for all $B \in \mathcal{B}$ (sets only get smaller in this construction).
Then $\mathcal{B}$ is completely as required.