
Doug C. answered 02/15/25
Math Tutor with Reputation to make difficult concepts understandable
B = A + 3 (B has 3 more than A)
B - 18 = (5/8)A (after 18 removed from B the result has 5/8 of number in A)
8B - 144 = 5A (multiply every term by 8 to clear the fraction)
8(A + 3) - 144 = 5A (substitute the equivalent expression for B in terms of A from 1st equation)
8A + 24 - 144 = 5A
3A = 120
A = 40
B = 43
Total number at beginning 83.
Check:
Reduce B by 18; B now has 25.
5/8 of 40 is 25.