If S is last years salary, we know that this year's salary (after the raise) is calculated by adding 6% of S to S:
[tex]S+S\cdot\frac{6}{100}=31,800[/tex]We solve here to get last year's salary:
[tex]S(1+0.06)=31,800[/tex][tex]S=\frac{31,800}{1.06}=30,000[/tex]Last year's salary was $30,000