Question 339861
there are 9 total balls, so there are 9! total ways to arrange the balls
--
of these, we are interested in when the end balls are of different colors, so tha leaves 7 balls in the middle (4 white and 3 black)which can be arranged in 7! 
--
the arrangements will be White*7!*Black or Black*7!*White
For White*7!*Black:  that first white ball can be chosen in 5 different ways, and the last black ball can be chosen in 4 different ways,
so all together there are 5*7!*4=20*7! ways to do this
For Black*7!*White:  that first black ball can be chosen in 4 different ways,
and the last white ball can be chose in 5 different ways
so all together there are 4*7!*5=20*7! ways to do this.
--
So the probability is defined as #ways(White*7!*Black or Black*7!*White)/9!
=(20*7!+20*7!)/9!=40*7!/9!=40/(9*8)=5/9