how to compute total number of ways in which 3 differently colored bottles could be arranged in a line out of a total of 9 bottles
Do yo mean that there are 9 differently colored bottles, and you need to enumerate the ways to choose 3 among these and put them in a line?
Then it would be : 9 choices for the first bottle in the line, 8 for the second (it can't be the first), and finally 7 choices for the third bottle.