Let t be the tens digit and u be the units digit. Notice that the value of the number is equal to 10t + u. For example, if the number were 24, 10t + u would be equal to 10(2) + 4 = 24.
Now 5 times the sum of the digits can be written as 5(t + u). So the difference between the number and 5 times the sum of its digits is:
10t + u - 5(t + u) = 18.
Simplify:
10t + u - 5t - 5u = 18.
5t - 4u = 18.
Now we also know that the tens digit is twice the units digit, i.e. t = 2u.
Subtract 2u from both sides:
t - 2u = 0.
So now we have a system of two equations:
5t - 4u = 18.
t - 2u = 0.
Let's multiply the second equation by -2 so we can eliminate the u:
5t - 4u = 18.
-2t + 4u = 0.
Add the two equations:
3t = 18.
Divide by 3:
t = 6.
Now we know that t = 2u, so substituting 6 for t we get 6 = 2u. Dividing by two gives us u = 3.
So our number is 63. We can check this easily: five times the sum of the digits is equal to 5*9 = 45. Notice 63 - 45 = 18 just like we wanted. Hope this helps.