You can verify this question with the options also.
let ten’s digits =$x$
then unit digit=$\frac{8}{x}$
so the number is $10x+\frac{8}{x}$
now according to the question;
$\implies 10x+\frac{8}{x}+18=10*\frac{8}{x}+x$
$\implies \frac{10x^2+8+18x}{x}=\frac{80+x^2}{x}$
$\implies 9x^2+18x-72=0$
$\implies x^2+2x-8=0$
$\implies x(x+4)-2(x+4)=0$
$\implies(x+4)(x_2)=0$
$\implies x=-4,2$
$\therefore \text{ten’s digit=2, unit digit=$\frac{8}{2}$=4}$
So the number is $24$
Option $B$ is correct here.