Your salary used to be $39,000 per year.

You had to take a 5% pay cut. After the cut, your salary was per year.

Then, you earned a 5% raise. After the raise, your salary was per year.

Multiply 39,000 by 0.05, then take that away from 39,000.

After that, you get 37,050.

Take 37,050, and multiply it by 0.05, then add it to 37,050.

You get 38902.5

So yeah.

Yay!