It is given in the question that
A boy received 2 hamsters for christmas. after one year he had 4, after two years he had 12, and after three years he had 48.
THe sequence is
2,4,12,48
First we have to check out the pattern here.
And the pattern is

THerefore after four years , number of hamsters are 240 .