I can't say I understand exactly what you mean by `mathematical process`

, but let me try.

The probability of the event that out of `12`

games, `A`

wins `7`

games, `B`

wins `2`

games and and remaining `3`

games end in draw is:

p = \{\mathbb{P}(\text{A wins})\} ^ 7 \times \{\mathbb{P}(\text{B wins})\} ^ 2 \times \{\mathbb{P}(\text{draw})\} ^ 3

, since result in any one game is independent of any other game (and hence the probabilities are multiplicative).

Now, this event can occur in as many ways as the number of possible permutations of the sequence of `7`

wins of `A`

, `2`

wins of `B`

and `3`

draws [for example, \text{AAAAAAABBDDD}], and that is equal to:

n = \frac{12!}{7! \times 2! \times 3!}

, following the standard formula for permutation of n_1 + n_2 + \dots + n_k objects, out of which n_i are of \text{Type i} and indistinguishable, \forall \ i \in 1(1)k.

Hence, \text{required probability} = n * p, as the probability of the event will remain same irrespective of the order in the results of the game.

```
# directly
dmultinom(x = c(7, 2, 3),
size = 12,
prob = c(0.4, 0.35, 0.25))
#> [1] 0.02483712
# manually
(factorial(x = 12) / (factorial(x = 7) * factorial(x = 2) * factorial(x = 3))) * (0.4 ^ 7) * (0.35 ^ 2) * (0.25 ^ 3)
#> [1] 0.02483712
```

^{Created on 2019-10-14 by the reprex package (v0.3.0)}

Hope this helps.