The boxes are different B1, B2, B3
When you split the balls 3-1-1, which box gets 3 balls? You first select a box which gets 3 balls. You can do this in 3 ways - select B1 or B2 or B3.
Now select 3 of the 5 balls for this box in 5C3 ways. Now you have 2 balls and 2 boxes one for each ball so you can distribute them in 2 ways.
This gives 3*5C3*2 = 60.
Same problem for 2-2-1 case. You multiply by another 3 and you get 3*30 = 90
Total 60+90 = 150
thank you so much for answering me.