Probability/ Combination Question | Help!

Hello,

I am new to probability.

Please have a look at the following question.

We have n = 10 persons and we wish to divide them at random into 3 groups consisting of 5, 3, and 2 persons respectively. In how many ways is this possible?

I have tried to solve it in following way.

Total number of possible ways =

Next!

Next!

I think the above solution is correct but I really don't know how it happens.

I mean to say that I am confused in

1 - Why are we multiplying 10C5 with 5C3 and 2C2 ? Which rule or formula implies this multiplication of combinations?

2 - When and in which situations do I need to multiply combinations?

Any help would be highly appreciated.