The answer is 79 and 80.
x - the number of the first locker
x + 1 - the number of the consecutive locker
Their sum is 159.
x + x + 1 = 159
2x + 1 = 159
2x = 159 - 1
2x = 158
x = 158 / 2
x = 79
x - the number of the first locker: x = 79
x + 1 - the number of the consecutive locker x + 1 = 79 + 1 = 80