so 5x+15 = 5x+3*5
Now you notice there is a 5 in both terms, so we can write it like this
Now we can pull it out of both
And of course, you can check this by seeing that the 5 will be distributed to each element within the parentheses. Factoring is basically "undistributing."
So 5x+15 = 5(x+3)