To obtain the present value of the salvage value ($S$) you discount the value of the salvage $n$ times. Therefore the whole formula is
$$PV_n(i)=-P+A\cdot \frac{(1+i)^n-1}{i\cdot (1+i)^n}+\frac{S}{(1+i)^n}$$
To obtain the present value of the salvage value ($S$) you discount the value of the salvage $n$ times. Therefore the whole formula is
$$PV_n(i)=-P+A\cdot \frac{(1+i)^n-1}{i\cdot (1+i)^n}+\frac{S}{(1+i)^n}$$