Let
x be the unit digit and
y be tens digit.
Then the original number be 10x+y.
Value of the number with reversed digits is 10y+x.
As per question, we have
x+y=12 ....(1)
If the digits are reversed, the digits is greater than the original number by 18.
Therefore, 10y+x=10x+y+18
⇒9x−9y=−18 ....(2)
Multiply equation (1) by 9, we get
9x+9y=108 ....(3)
Add equations (2)and (3),
18x=90
⇒x=5
Substitute this value in equation (1), we get
5+y=12⇒y=7
Therefore, the original number is 10x+y=10×5+7=57..