Explanation:
Q 5
Let the one white ball be
4 black balls be
& 5 red balls be
Therefore, sample space is given as:

Q 6
Given number is: 112964333
sample space for above number can be given as:

Note: Digits appearing in a number more than one time will be written only once while writing sample space.