$(a)$ Prove that in a triangle the sum of the distances from the centroid to the sides is not less than three times the inradius, and find the cases  of equality.
$(b)$ Determine the points in a triangle that minimize the sum of the distances to the sides.
### Part (a)

1. **Define the centroid and distances:**
   Let \( G \) be the centroid of triangle \( \triangle ABC \). The distance from \( G \) to side \( BC \) is \(\frac{1}{3} h_a\), where \( h_a \) is the altitude from vertex \( A \) to side \( BC \). Similarly, the distances from \( G \) to sides \( CA \) and \( AB \) are \(\frac{1}{3} h_b\) and \(\frac{1}{3} h_c\) respectively.

2. **Sum of distances from centroid to sides:**
   The sum of the distances from \( G \) to the sides of \( \triangle ABC \) is:
   \[
   \frac{1}{3} h_a + \frac{1}{3} h_b + \frac{1}{3} h_c = \frac{1}{3} (h_a + h_b + h_c)
   \]

3. **Relate altitudes to the area:**
   The area \( \Delta \) of \( \triangle ABC \) can be expressed using the altitudes:
   \[
   \Delta = \frac{1}{2} a h_a = \frac{1}{2} b h_b = \frac{1}{2} c h_c
   \]
   Therefore,
   \[
   a h_a = b h_b = c h_c = 2 \Delta
   \]

4. **Use the Rearrangement Inequality:**
   Since \( (a, b, c) \) and \( (h_a, h_b, h_c) \) are oppositely sorted, by the Rearrangement Inequality:
   \[
   (a + b + c)(h_a + h_b + h_c) \geq 3 (a h_a + b h_b + c h_c)
   \]
   Substituting \( a h_a + b h_b + c h_c = 6 \Delta \):
   \[
   (a + b + c)(h_a + h_b + h_c) \geq 18 \Delta
   \]

5. **Relate the inradius \( r \) to the area:**
   The inradius \( r \) is given by:
   \[
   r = \frac{\Delta}{s}
   \]
   where \( s = \frac{a + b + c}{2} \) is the semi-perimeter. Thus,
   \[
   9r = \frac{9 \Delta}{s} = \frac{18 \Delta}{a + b + c}
   \]

6. **Combine the inequalities:**
   From the Rearrangement Inequality:
   \[
   h_a + h_b + h_c \geq \frac{18 \Delta}{a + b + c} = 9r
   \]

Thus, we have shown that the sum of the distances from the centroid to the sides is not less than three times the inradius.

### Part (b)

1. **Consider a line parallel to a side:**
   Draw \( \triangle ABC \) with \( B \) to the left of \( C \). Consider a line \( l_a \) parallel to \( BC \) intersecting \( AB \) at \( B' \) and \( AC \) at \( C' \). Let \( P \) be a variable point on \( l_a \).

2. **Distance properties:**
   - The distance \( d(P, BC) \) from \( P \) to \( BC \) is constant.
   - The distances \( d(P, AB) \) and \( d(P, AC) \) are linear in \( PB' \) and \( PC' \) respectively.

3. **Minimize the sum of distances:**
   Moving \( P \) to the left of \( B' \) or to the right of \( C' \) increases both distances \( d(P, AB) \) and \( d(P, AC) \). Hence, the sum of distances from \( P \) to the sides is minimized when \( P \) is on the boundary of \( \triangle ABC \).

4. **Boundary points:**
   Since the sum of distances from \( P \) to the sides is linear on \( B'C' \), it attains its minimum at either \( B' \) or \( C' \). Repeating this argument with other sides, we see that the sum of distances to the sides takes its minimum at either \( A \), \( B \), or \( C \).

5. **Conclusion:**
   The minimum sum of distances is \( \min(h_a, h_b, h_c) \). If \( BC \) is the unique longest side in \( \triangle ABC \), then the unique point minimizing the sum of distances to the sides is \( A \). If \( BC = CA > AB \), then all points on segment \( AB \) minimize the sum. If \( \triangle ABC \) is equilateral, then all points inside or on the boundary of \( \triangle ABC \) minimize the sum.

The final answer is \( \boxed{ \min(h_a, h_b, h_c) } \).