Two angles in the same parallelogram must either be equal or else add up to 180 degrees. These two are obviously not equal, so they must add up to 180.
A + B = 180
A = 180 - B (we'll use this in just a second)
A = 3B + 40
180 - B = 3B + 40
Add 'B' to each side:
180 = 4B + 40
Subtract 40 from each side:
140 = 4B
Divide each side by 4 :
35 = B
A = 180 - B = 145