Here, they said that each box must have at most one ball, which means each box will have either 0 balls or 1 ball.

There are 7 positions to place each ball in, and 5 distinct balls. the first ball B1 can be put in 7 different positions, followed by the second ball in 6 different positions, third ball in 5 different positions, fourth in 4 different positions and the last ball in 3 different positions.
$ \therefore $ no. of ways = 7*6*5*4*3 = 2520 ways

here, all the boxes are identical, hence, whichever box the ball is put in, it will be same, therefore there are 1*1*1*1*1 = 1 way only.

Since all the objects are identical and every position has to have no more than 1 ball, we only need to select 5 positions from 7 positions, which can be done in $ \binom{7}{5} $ = 21 ways.

This is similar to the problem where the boxes were identical. Now, even the balls are identical here, Therefore, whichever way we chose to place the balls in, it will result in the same pattern. Therefore, there is only 1 way