Correct answer is option 2.
Detailed explanation is provided in the pic below:
For case b in the picture above i.e. number of balls m <= number of bags n , it is assumed that one bag cannot contain more than one ball. In that case number of ways will be nCm.
But if the question says that a bag can contain any number of balls, then number of ways will become (n+m-1)Cm.
It must be mentioned in the question. According to the question it must be decided.