Permutation and Combination

I want to distribute n balls into r person but in n balls there are a1 ,a2,a3…ak are alikes.
Question is asking in how many ways we can distribute it into r boxes.

Please Help…
Thanks in advance

You can read about it here:
Here is an useful video:

Thanks alot