If you were to multiply the amount of barrettes in each box by the amount of boxes, you would get the total number of barrettes.
30 = 6x
30 = total number of barrettes
x = amount of barrettes in each box
6 = number of boxes containing barretttes
Hope this helps