Let the main current be I. Current through galvanometer $I_g = 0.02I$. Current through shunt $I_s = I - I_g = 0.98I$. Since they are in parallel, the voltage drop is the same: $I_g G = I_s S$. So, $0.02I \times G = 0.98I \times S$. This gives $S = (0.02/0.98)G = (1/49)G$.