The first cube can land in any one of 6 ways. The second cube can land in any one of 6 ways. Total number of ways that 2 dice can land = (6 x 6) = 36 ways.
For any of these ways, the sum of the numbers rolled is 9 :
3, 6 4, 5 5, 4 6, 3
There are 4 ways to roll a 9, out of a total of 36 ways that the dice can land. So the probability of rolling a 9 is