If three balls are drawn from 10 balls with replacment, then you should count:
1. the probability to choose white ball -

;
2. the probability to choose red ball -

;
3. the probability to choose black ball -

.
Using the product rule you can conclude that
the probability that all 3 balls are different colors is:
.