Let the 2 digit number be in the form of 10x+y where x and y are positive integers.
so according to question
xy=8
And If 18 is added to the number the digits are reversed
So
10x+y+18=10y+x
9x-9y+18=0
or x-y+2=0
So
Roots of this equation are
x=2 and x=-4
but x is positive integer So x=2 and similarly y=4
So the number is 24