you should know that 15=3*5

so 5x+15 = 5x+3*5

Now you notice there is a 5 in both terms, so we can write it like this

5(x)+5(3)

Now we can pull it out of both

5(x+3)

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)