Let the first number be x and the second number be y. Then x-y = 18, assuming that x>y. y, the smaller number, is 1/7 th of x.
x-y=18 and y=x/7 govern this situation.
Let's find x. Subst. x/7 for y in x-y=18: x-x/7 = 18
Mult. all 3 terms by 7 to remove fractions: 7x - x = 126
Combine: 6x = 126; solve for x by div. both sides by 6: x = 21
The larger number is 21 and the smaller number is (21-18) = 3.