We know, by conservation of energy :
[tex]\dfrac{kx^2}{2}=mgh[/tex]
Therefore,
[tex]\dfrac{x_1^2}{x_2^2}=\dfrac{h_1}{h_2}[/tex]
Putting given values, we get :
[tex]\dfrac{x_1^2}{x_2^2}=\dfrac{h_1}{h_2}\\\\\dfrac{4.9^2}{x_2^2}=\dfrac{50.2}{2\times 50.2}\\\\x_2^2=2\times 4.9^2\\\\x_2 = 4.9\times \sqrt{2}\\\\x_2=6.93\ cm[/tex]
Therefore, the spring be compressed to 6.93 cm to send the ball twice as high.
Hence, this is the required solution.