We can see that b and 140 are on a straight line. A straight line is an angle of 180. SO:
140 + b = 180
b = 40
As indicated by the arrows, the two horizontal lines are parallel, and also due to the transversal, we know that a and b are corresponding angles.
Therefore, a = 40, since corresponding angles are equal
b = 40
a = 40
Hope this helped! Ask me if there's anything you don't understand :D