Let the number is xy.
This number can be represented as 10x+y.
The number with digits as the reverse to the original number is yx.
It is equaivalent to 10y+x.
When the number is subtracted from the number with digits as the reverse of the original number, we get 27.
⇒yx−xy=27
⇒10y+x−(10x+y)=27
⇒10y+x−10x−y=27
⇒9y−9x=27
⇒9(y−x)=27
⇒y−x=3 ...(a)
Also, the sum of the digits is 9.
⇒x+y=7 ...(b)
Add (a) and (b) to eliminate x.
y−x+x+y=3+7
⇒2y=10
⇒y=5
Substituting y in (a) we get,
5−x=3
⇒x=2
∴ The original number xy is 25.