Ethan gave you the great explanation for understanding but I want to give you algebraic one.
You can rewrite the expression as 1×x +3×x. Now it looks like formula for distributive proprety
a×c - b×c=(a - b)×c
By applying distributive proprety you will get (1 + 3)×x = 4×x = 4x
This method only works if your terms have common variable, called like terms.
If you noticed: the coefitient in your answer is the sum of like terms coefitients.
Hope it helped.