Explanation:
Let's say the two digit number is 10x + y, where x is the first digit and y is the second digit.
The sum of the digits is 8:
x + y = 8
If 8 is subtracted from the number, the digits switch place.
10x + y − 8 = 10y + x
Simplify the second equation:
9x − 8 = 9y
Substitute from the first equation.
y = 8 − x
9x − 8 = 9 (8 − x)
9x − 8 = 72 − 9x
18x = 80
x = 4.444
There's a problem. x isn't an integer. Are you sure you copied the problem correctly? Perhaps you meant if 18 is subtracted from the number, the digits switch place.
9x − 18 = 9 (8 − x)
9x − 18 = 72 − 9x
18x = 90
x = 5
y = 8 − x
y = 3
So the number is 53.