you set 40 over 100 because a percentage is just a number in 100 -> 40/100
then, you want to know how much something is out of 80, so you set a variable (x) over 80 -> x/80. Because you want to know the equal value from out of 100 to out of 80, you set these 2 as equal -> 40/100 = x/80
cross multiply:
3200 = 100x
simplify:
32 = x