Question 1184392

Jane had some sweets and chocolates, if Jane gives 24 sweets away, the number of sweets and chocolates left became 4:1, if Jane  gave 20 chocolates away, the ratio of the number of sweet to the number of chocolates left became 5:1, Find the total number of sweets and chocolates Jane had at first.
<pre>Let number of sweets and chocolate, be S and C, respectively
{{{system(matrix(2,3, (S - 24)/C, "=", 4/1, S - 24, "=", 4C), matrix(1,6, S - 4C, "=", 24, "-------", eq, "(i)")))}}}      {{{system(matrix(2,3, S/(C - 20), "=", 5/1, S, "=", 5(C - 20)), matrix(1,6, S - 5C, "=", - 100, "-------", eq, "(ii)")))}}}
Number of chocolate, or <font color = red><b>C = 124</font></b> ----- Subtracting eq (ii) from eq (i)
Number of sweets, or S = 24 + 4(124) = <font color = red><b>496</font></b> ------ Substituting 124 for C in eq (i)