Here is your equation:
[tex] 40 \div x = 5 [/tex]
You have to divide 40 by a number to get 5. Switch it around, and divide 40 by 5. Since 40 divided by x is equal to 5, then 40 divided by 5 is equal to x.
[tex] 40 \div 5 = 8 [/tex]
That means x is equal to 8