The rules
The code consists of three digits from 0 to 9, called A, B, and C from left to right. You can determine the order without trying the lock. “First digit” always means the leftmost position.
The three sums
The first and second digits sum to 9. The second and third sum to 7. The first and third sum to 8. Use all three clues. These are sums, not two digits joined into a number.
Cancel a repeated digit
Compare the first two clues: both contain B, so subtraction tells you how A and C differ. Combine that with the third clue. Alternatively, list all pairs summing to 9 and filter them using the other two conditions.
