Let the number that Tom had = T
Then Peter had 4T
When tom got 48 pencils, Tom only had twice as many
So
2 *(T + 48) = 4T
2T + 96 = 4T
96 = 4T - 2T
96 = 2T
96/2 = T = 48
a ) Tom had 48 + 48 = 96 at the end
b ) Peter had 4 (48) = 192
Together, they had 96 + 192 = 288
