The exterior angles of any polygon will always add up to 360 degrees. Since we know all the values for every exterior angle, we can simply make the following equation:
3x + (x + 50) + 4x + (2x + 40) = 360
Simplify:
10x + 90 = 360
10x = 270
x = 27
If you want me to explain anything I did here, just ask :)
-T.B.