The two angles are supplementary angles and make a straight line.
This means when added together they need to equal 180 degrees.
x + 34 + 2x + 2 = 180
Combine like terms:
3x + 36 = 180
Subtract 36 from each side:
3x = 144
Divide both sides by 3:
x = 48