Suppose that,
The two digit number is 10x+y
Then, the unit palace is y and tens palace is x
According to given question,
y=x2…… (1)
Then,
Again, according to given question,
10x+y+54=10y+x
⇒10x−x+y−10y+54=0
⇒9x−9y+54=0
⇒x−y+6=0......(2)
From equation (1) to,
⇒x−x2+6=0
⇒−x2+x+6=0
⇒x2−x−6=0
⇒x2−(3−2)x−6=0
⇒x2−3x+2x−6=0
⇒x(x−3)+2(x−3)=0
⇒(x−3)(x+2)=0
For,
x−3=0
x=3
Put in (2)
Then,
x−y+6=0
3−y+6=0
−y+9=0
y=9
Then,
The number is
10x+y
⇒10×3+9
⇒39
Hence, this is the answer.