Question 1207317
.
Sally has 1153 colored marbles. 
She buys more red marbles to double the original number of red marbles and gives away half her blue marbles. 
She loses 30 green marbles and buys 20 more purple marbles. All the marbles are equal in number. 
How many of each did she have at first.
~~~~~~~~~~~~~~~~~~


<pre>
Let R be the original number of red    marbles; 
    B be the original number of blue   marbles; 
    G be the original number of green  marbles; 
    P be the original number of purple marbles.


For these quantities, we have this equation

    R + B + G + P = 1153.    (1)


After changes,

    - the number of red   marbles is 2R;

    - the number of blue  marbles is 0.5B;

    - the number of green  marbles is G-30;

    - the number of purple marbles is P+20.


We also are given that 

    2R = 0.5B = G-30 = P+20 = k,

where k is the common value of marbles of each of four colors after changes.


Thus  R = 0.5k;  B = 2k;  G = k+30;  P = k-20.


We substitute these expressions into equation (1). 
We then get this equation for single unknown k

    0.5k + 2k + (k+30) + (k-20) = 1153.


Simplify and find k

    4.5k = 1153 - 30 + 20

    4.5k = 1143

       k = 1143/4.5 =  254.


So, the number of red    marbles originally was 0.5*254 = 127;

    the number of blue   marbles originally was 2*254 = 508;

    the number of green  marbles originally was 254+30 = 284;

    the number of purple marbles originally was 254-20 = 234.
</pre>

Solved.