Can anyone tell what is wrong in this? It is exceeding total arrangements of 5! = 120 ways.
1st let us select 2 balls => 5C2 = 10
The 1st ball has 4 positions.
If the 1st ball occupies the position which must not be occupied by 2nd ball, then 2nd ball has 4 positions otherwise if the 1st ball occupies any other position, then 2nd ball has only 3 positions.
The remaining 3 balls can be arranged in 3P3 ways = 3! ways = 6 ways
Thus total ways = 10 * ((1*4)+(3*3)) * 6 = 10*(4+9)*6 = 780 ways