et the digits in the tens place be x and ones place be y
Hence the number is (10x + y)
Number formed by reversing the digits = (10y + x)
Given sum of digits = 5
⇒ x + y = 5 → (1)
Also given that when 9 is added to the number the digits gets interchanged
(10x + y) + 9 = (10y + x)
⇒ 10x + y + 9 – 10 y – x = 0
⇒ 9x – 9y = –9
⇒ x – y = –1 → (2)
Add (1) and (2), we get
x + y = 5
x – y = –1
------------
2x = 4
∴ x = 2
Put x = 2 in x + y = 5
2 + y = 5
∴ y = 3
Hence the number is 23