when we want to expand brackets, we take each thing just outside the bracket and multiply each thing on the inside. so here we have a 5 on the outside, so we take it and multiply the n on the inside and then the -1 on the inside and just add the answers.

so,

here we want to do the opposite. we want to look for what is common among the terms and pull it out. here we see that 5 is common. since we can get 5 out of 5x to leave x, since 5x = 5*x and 5 out of 15 to leave 3, since 15 = 3*5factorise 5x - 15

so,

do you get it?