Let a be the number in the 10s place and b in the 1s place. Then the original two-digit number is 10a + b.
The sum of the digits is 5:
a + b = 5
Subtract 9 from the original number, and we get the same number with its digits reversed:
(10a + b) - 9 = 10b + a
Simplifying this equation gives
9a - 9b = 9
or
a - b = 1
Add this to the first equation above:
(a + b) + (a - b) = 5 + 1
2a = 6
a = 3
Then
3 - b = 1
b = 2
So the original number is 32. Just to check, we have 3 + 2 = 5, and 32 - 9 = 23.