Answer :

8 is the answer because
24=1,2,3,4,6,8,12 and 24
32=1,2,4,8,16 and 32
40=1,2,4,5,8,10,20 and 40
the common number in everything is 8