by triangle angle addition law
a + b + c = 180
3x +1 + 2x-1 +40 = 180
5x +40 = 180
5x = 180 - 40 = 140
x = 140/5 = 28
so
b = 2x -1 = 2×28-1= 56-1 = 55