5(2x-8) can be expanded by multiplying each part by the 5.
5(2x-8) = 5*2x + 5*(-8) = 10x - 40.
Alternately, if you are asked to factorise 5(2x-8), you should look for common factors. 2 is the highet common factor of 2x and -8.
5*(2x-8) = 5*2*(x-4) = 10*(x-4)
See that when we factorise 10x - 40, it also becomes 10(x-4). The highest common factor of 10x and 40 is 10.
10x - 40 = 10*(x-4)