Let $T$ be a triangle with side lengths 3, 4, and 5.  If $P$ is a point in or on $T$, what is the greatest possible sum of the distances from $P$ to each of the three sides of $T$?
1. **Identify the type of triangle**: The given triangle has side lengths 3, 4, and 5. We recognize this as a right triangle because \(3^2 + 4^2 = 5^2\).

2. **Use the formula for the sum of distances from a point to the sides of a triangle**: For any point \(P\) inside a triangle, the sum of the perpendicular distances from \(P\) to the sides of the triangle is constant and equal to the triangle's altitude from the vertex opposite the longest side (hypotenuse in this case).

3. **Calculate the area of the triangle**: 
   \[
   \text{Area} = \frac{1}{2} \times \text{base} \times \text{height} = \frac{1}{2} \times 3 \times 4 = 6
   \]

4. **Determine the altitude from the hypotenuse**: The hypotenuse is 5. The altitude \(h\) from the hypotenuse to the right angle vertex can be found using the area:
   \[
   \text{Area} = \frac{1}{2} \times \text{hypotenuse} \times h \implies 6 = \frac{1}{2} \times 5 \times h \implies h = \frac{12}{5}
   \]

5. **Sum of distances from \(P\) to the sides**: The sum of the distances from any point \(P\) inside the triangle to the sides of the triangle is equal to the altitude from the hypotenuse to the right angle vertex, which is \(\frac{12}{5}\).

6. **Greatest possible sum of distances**: Since the sum of the distances from any point \(P\) inside the triangle to the sides is constant and equal to the altitude from the hypotenuse, the greatest possible sum of the distances from \(P\) to the sides of the triangle is \(\frac{12}{5}\).

The final answer is \(\boxed{\frac{12}{5}}\)