Ratio of fruits This is a very interesting Diophantine equation word problem that I came across in an old textbook of mine. It is quite nice and I decided I would share it with MSE for future reference and a fun time?! So anyway I figured out the answer and posted it below so you can see (This is a Q&A post). So without further ado, the question is:

The ratio of the number of apples to oranges to pears is 7:11:9. 
  Timmy ate 21 fruits.
As a result, the ratio of the number of apples to oranges to pears 
  became 2:3:3. How many fruits were left ?

Any further hints and alternate methods to the one below would be greatly appreciated. Thanks :)
 A: Since we won't be dealing in fractions here, the total number of fruits
to begin with ($B$) must be a multiple of 7+11+9 = 27 and after Timmy pigs
out, a multiple of 8 ($A$). That is because 7, 11, and 9 have no common
factors, nor do 2 and 3.
Let $B$ = 27$b$ and A = 8$a$.
27$b$ - 21 = 8$a$
We need to solve this Diophantine Equation in integers.
$b$ = 
$\frac{8a + 21}{27}$
27 = 3 × 3 × 3, so 8a + 21 must be divisible by 3,
21 is a multiple of 3, so 8$a$ must also be a multiple of 3.
Therefore a must be a multiple of 3.
Trying various multiples of 3, we find that the lowest value of a that
makes this come out in integers is 21.
(There are better ways of doing this, but in this case the slow method
works because the numbers are small enough.)
$a$ = 21, means there were 168 fruits left (8$a$):
42 apples, 63 oranges, 63 pears (2$a$, 3$a$, 3$a$)
Adding the 21 fruits Timmy ate, makes 189 fruits
$\frac{189}{27}$ 
= 7, so $b$ = 7
49 apples, 77 oranges, 63 pears. (7$b$, 11$b$, 9$b$)
He ate 7 apples, 14 oranges, and 0 pears.
