Explanation:
look at a die, for example.
the probabilty to roll a 6 is 1/6 (if all numbers truly have the same probability due to a perfectly balanced die).
so, you expect as a mean value that you have to roll the die 6 times to get one 6.
now in our general example :
20% = 1/5
so, we expect event A to happen once as a mean value every 5 attempts.
now we do 40 attempts. that means 8×5 sets of attempts.
and we therefore expect to see event A 8 times.