Question 1176896

Hi
A and B  had some cards. After A lost 68 cards to B the ratio of cards that A and B had were 3:8 respectively. When B lost 126 cards to A the ratio of cards that A and B had were 2:3 respectively. 
How many cards did A have at first. 
Thanks
<pre>Let original number A and B had, be A and B, respectively
After A lost 68 cards to B, A had A - 68 remaining, and B then had, B + 68
We then get: {{{matrix(2,1, matrix(4,3, (A - 68)/(B + 68), "=", 3/8, 8(A - 68), "=", 3(B + 68), 8A - 8(68), "=", 3B + 3(68), 8A - 3B, "=", 3(68) + 8(68)), matrix(1,6, 8A - 3B, "=", 748, "-----", eq, "(i)"))}}}     {{{ matrix(2,1, matrix(4,3, (A - 68 + 126)/(B + 68 - 126), "=", 2/3, 3(A + 58), "=", 2(B - 58), 3A + 3(58), "=", 2B - 2(58), 3A - 2B, "=", - 2(58) - 3(58)), matrix(1,6, 3A - 2B, "=", - 290, "-----", eq, "(ii)"))}}}
16A - 6B = 1,496 ---- Multiplying eq (i) by 2 ---- eq (iii)
 9A - 6B = - 870 ---- Multiplying eq (ii) by 3 --- eq (iv)
      7A = 2,366 -------- Subtracting eq (iv) from eq (iii)
Original number A had, or {{{highlight_green(matrix(1,5, A, "=", "2,366"/7, "=", 338))}}}