The angle measurement of the line is 180 degrees because it is a straight line. Therefore, the shown two angle measurements must add up to 180 as well. So:
(2x+45) + x = 180
Combine like terms to simplify
3x + 45 = 180
-45 -45
Subtract 45 on both sides to isolate the variable
3x = 135
Divide 3 on both sides to isolate the variable as well