In this question you are looking at a straight line. The sum of a straight line is 180 degrees. To work out the measurements of each angle you need to work out what x is first.
This means that from your diagram:
(5x-30)+2x = 180
From here you get rid of the brackets
5x - 30 + 2x = 180
Because both the 30 and 180 are measured in degrees, you can move the 30 to the other side.
5x + 2x = 180 + 30
Therefor:
7x = 210
x = 210/7
x = 30
5x = 150
2x = 60
Hope that helps