Peter and James have x marbles altogether. If Peter gives 4 marbles to James, then Peter has twice as many marbles as James. If Peter gives 12 marbles to James, then they have the same number of marbles. Find the value of x.
Let the original number of Peter's marbles be a and then that of James's marbles be x-a
(a-4)=2[(x-a)+4]---(1)
(a-12)=(x-a)+12---(2)
(1)-2*(2):
(a-4)-2(a-12)=8-2(12)
20-a=-16
a=36---(3)
Sub (3) into (2)
x=48