Notice that we combined the 2x from the first polynomial with the −x from the second polynomial to get
2x − x = x,
and the constants 3 and 1 combine to give 4.