I have been thinking about it a lot and my conclusion has been like this :
I found the possible places where the $1$st ball can go, it is $(n-1)$.Then the next ball can go to the bin where the number $1$ ball didn't go. So there will be two possible cases. Suppose that the ball $1$ goes to bin $x$ and if $x \ne 2$ then the second ball can go to $(n-2)$ places. However if $x=2$ then the second ball can go to $(n-1)$ places.
However continuing like this the problem is becoming almost impossible for me to solve. I need some help in this