This a questions about angles! Let's see how to solve it:
In this figure, we have a straight angle. A straight angle is a 180 degree angle. In this case, the straight angle is the sum of 40° and b.
So, we can do an equation and solve it. See below:

Therefore, the measure of
is 140°.