In this section we prove the second part of the main theorem, namely:
Theorem 5
LetGbe a graph with girth at least 9. IfGhas a good set, thenχ_{
b
}(G)=m(G).
Let W={v_{1},…,v_{m(G)}} be a good set of G. Our aim is to construct a bcoloring of G with m(G) colors such that, for each i∈{1,…,m(G)}, vertex v_{
i
} is a bvertex of color i. We start by assigning color i to v_{
i
}, for each i∈{1,…,m(G)}. Next, we extend this partial coloring to the rest of the graph in several steps. Before explaining each step, we need to introduce some other terminology and notation.
A link is any path of length two or three whose extremities are in W and whose internal vertices are not in W. Any interior vertex of a link is called a link vertex. Let L be the set of all link vertices.
We first color G[W∪L] in a way not to repeat too many colors in N(w), for all w∈W, and at the end we extend the obtained partial coloring to a bcoloring of G with m(G) colors. Let G′=G[W∪L], L_{1} be the set of vertices of L that have at least one neighbor in L and L_{2} be the set of vertices in L that have at least two neighbors in W. The steps below are followed in order in such a way that we only move on to the next step when all the possible vertices are iterated.

1.
For each x∈L_{1}, let x′∈N^{L}(x). Since x′∈L, there must exist v_{
i
}∈N^{W}(x′); color x with i;

2.
For each v_{
i
}∈W, let . Also, let . If q>1, then use colors i_{1},…,i_{
q
} to color the uncolored vertices in in a way that x_{
j
} is not colored with i_{
j
} (it suffices to make a derangement of those colors on the vertices);

3.
Let x∈L_{2} still uncolored be such that there exists v_{
i
}∈N^{W}(x) that has some neighbor y∈L_{1}. Let c be the color of y; color x with c and recolor y with j, for any v_{
j
}∈N^{W}(x)∖{v_{
i
}};

4.
Finally, if x∈L_{2} is still uncolored, we know that N^{L}(v_{
i
})={x}, for all v_{
i
}∈N^{W}(x). Since N^{L}(x)=∅, we can color x with i, for any v_{
i
} that is not adjacent to x and has no common neighbor with x in W of degree m(G)−1, which exists as x is not encircled by W.
Suppose that the algorithm above produces a partial coloring that colors every vertex in L in such a way that, at the end, each v_{
i
}∈W has at least as many uncolored neighbors as missing colors in its neighborhood. Since L is colored, we know that the uncolored neighbors of W form a stable set. Thus, we can independently color N(v_{
i
}) in such a way that v_{
i
} sees every other color, for all v_{
i
}∈W. By the definition of a good set, we know that if d(v)≥m(G), then v is already colored; hence, the partial coloring can be greedily transformed into a bcoloring with m(G) colors. Now, to prove that the algorithm works, we show that after these steps the obtained partial coloring ψ satisfies:
P1 ψ is proper; and
P2 the number of uncolored neighbors of v_{
i
} is at least the number of missing colors in N(v_{
i
}), for each v_{
i
}∈W.
Proof of Theorem 5
First, we make some observations concerning the coloring procedure. Note that L_{1}∩L_{2} is not necessarily empty, but all vertices in this subset are colored in Step 1. However, a vertex x∈L_{1}∩L_{2} may play a role in Step 2 in the following way: if x∈N(v_{
i
}) and there exists , then x′ may be colored with color j for some v_{
j
}∈N^{W}(x)∖{v_{
i
}}, while the color of x remains unchanged. Also, note that, in Step 3, since , we have y∈L_{1}∖L_{2}. Hence, N^{W}(y)={v_{
i
}} and, consequently, the color of y cannot be changed again. Thus (*) the color of y is changed at most once, for every y∈L_{1}. Finally, if x receives color i in Step 1, 2 or 3, then one of the following holds (fact (iii) holds because of (*)):

(i)
x receives color i in Step 1 and there exists a path 〈x,x′,v_{
i
}〉, for some x′∈L_{1}; or

(ii)
x receives color i in Step 2 and there exists a path 〈x,v_{
j
},x′,v_{
i
}〉, for some v_{
j
}∈W and x′∈L_{2}; or

(iii)
x receives color i in Step 3 and there exists a path 〈x,v_{
j
},y,y′,v_{
i
}〉, for some v_{
j
}∈W, y∈L_{1}∖L_{2} and y′∈L_{1}; or

(iv)
x is recolored with color i in Step 3 and there exists a path 〈x,v_{
j
},x′,v_{
i
}〉, for some v_{
j
}∈W and x′∈L_{2}∖L_{1}.
We first prove that P1 holds after Step 3. Suppose that there exists an edge wz such that ψ(w)=ψ(z)=i. Since G has no cycle of length at most 7, the paths defined in (i)–(iv) are shortest paths. Therefore, vertex v_{
i
} has no neighbor colored i and hence, w,z∈L. Also, as wz∈E(G), we have w,z∈L_{1} and they are colored in Step 1 and maybe recolored in Step 3. By (i) and (iv), there exist a w,v_{
i
}path P_{
w
} and a z,v_{
i
}path P_{
z
}, both of length at most 3. Note that either P_{
w
}+P_{
z
}+wz contains a cycle of length at most 7 or one of these paths consists of the edge wz followed by the other path. Because G has girth at least 9, the latter case occurs. We get as contradiction as this implies that at least one path is defined by (i) and, thus, vertex v_{
i
} has a neighbor colored i.
Now, we prove that P2 also holds after Step 3. We actually prove that, after Step 3, no color is repeated in N(v_{
i
}), for each v_{
i
}∈W. Suppose there exist a vertex v_{
j
}∈W and w,z∈N(v_{
j
}) such that ψ(w)=ψ(z)=i. First, consider the case v_{
i
}∈{w,z}. Since the paths defined by (i)–(iv) are shortest paths, we see that (i) occurs for the vertex in {w,z}∖{v_{
i
}}. We get a contradiction as this implies G has a cycle of length 4. Therefore we may assume v_{
i
}∉{w,z}.
Now, by (i)–(iv), there exist a w,v_{
i
}path P_{
w
} and a z,v_{
i
}path P_{
z
}. Let ℓ_{
w
} and ℓ_{
z
} be the length of P_{
w
} and P_{
z
}, respectively. Clearly ℓ_{
w
},ℓ_{
z
}≤4. Note that either P_{
w
}+P_{
z
}+〈w,v_{
j
},z〉 contains a cycle of length at most ℓ_{
w
}+ℓ_{
z
}+2 or either P_{
w
} or P_{
z
} consists of the path 〈w,v_{
j
},z〉 followed by the other path. Since both w and z are at distance at least 2 from v_{
i
} and ℓ_{
w
},ℓ_{
z
}≤4, the latter can only occur if one of the paths is defined by (i), say P_{
w
}, and the other is defined by (iii), say P_{
z
}. We get a contradiction as P_{
z
}=〈z,v_{
j
},w,y,v_{
i
}〉 implies w is recolored in Step 3 and therefore, P_{
w
} must be defined by (iv). Now, suppose that the former occurs, i.e., P_{
w
}+P_{
z
}+〈w,v_{
j
},z〉 contains a cycle of length at most ℓ_{
w
}+ℓ_{
z
}+2. Because G has girth at least 9, we have ℓ_{
w
}+ℓ_{
z
}≥7. This implies that at least one of P_{
w
} and P_{
z
}, say P_{
z
}, is defined by (iii), and the other is not defined by (i). Therefore z is colored in Step 3 and . Furthermore, w∈L_{1}∖L_{2} and N^{W}(w)={v_{
j
}}. Therefore, since (i) does not occur for w, we find that P_{
w
} must be defined by (iv). Thus the only choice for P_{
w
} is 〈w,v_{
j
},z,v_{
i
}〉, a contradiction as P1 holds.
Finally, consider x to be colored during Step 4 with color i. By the choice of i we know that v_{
i
}∉N(x). Thus, since N^{L}(x)=∅, Property P1 holds. Now, suppose that some v_{
j
}∈N(x) is such that color i already appears in N(v_{
j
}). Since N^{L}(v_{
j
})={x} we must have v_{
i
}∈N(v_{
j
}) and, by the choice of i, d(v_{
j
})>m(G)−1. Property P2 thus follows as i is the only repeated color in the neighborhood of v_{
j
}. □