A and B are alternate exterior angles and they are the same, so:
5x - 15 = 2x + 21
5x - 2x = 21 + 15
3x = 36
x = 36/3 = 12
Due to that, B = 2x + 21 = 2*12 + 21 = 24 + 21 = 45.