Relation between $X(f)$ and $S_x(f)$
$$ \mathscr{F} \Big\{ x(t) \Big\} \triangleq X(f) \triangleq \int\limits_{-\infty}^{\infty} x(t) \, e^{-j2 \pi f t} \ \mathrm{d}t $$

$$ \mathscr{F}^{-1} \Big\{ X(f) \Big\} \triangleq x(t) = \int\limits_{-\infty}^{\infty} X(f) \, e^{j2 \pi f t} \ \mathrm{d}f $$

Assuming $x(t)$ is real (which means that $R_x(\tau)$ is also real).

$$\begin{align}
 S_x(f) &amp;\triangleq \mathscr{F} \Big\{ R_x(\tau) \Big\} \\
\\
 &amp;= \int\limits_{-\infty}^{\infty} R_x(\tau) \, e^{-j2 \pi f \tau} \ \mathrm{d}\tau \\
\\
 &amp;= \int\limits_{-\infty}^{\infty} \left( \int_\limits{-\infty}^{\infty}x(t)x(t-\tau) \mathrm{d}t \right) \ e^{-j2 \pi f \tau} \ \mathrm{d}\tau \\
\\
 &amp;= \int\limits_{-\infty}^{\infty} \int_\limits{-\infty}^{\infty}x(t)x(t-\tau) \ e^{-j2 \pi f \tau} \,\mathrm{d}t \,\mathrm{d}\tau \\
\\
 &amp;= \int\limits_{-\infty}^{\infty} \int_\limits{-\infty}^{\infty}x(t)x(t-\tau) \ e^{-j2 \pi f \tau} \,\mathrm{d}\tau \,\mathrm{d}t \\
\\
 &amp;= \int\limits_{-\infty}^{\infty} x(t) \int_\limits{-\infty}^{\infty}x(t-\tau) \ e^{-j2 \pi f \tau} \,\mathrm{d}\tau \,\mathrm{d}t \\
\\
 &amp;= \int\limits_{-\infty}^{\infty} x(t) e^{-j2 \pi f t} \int_\limits{-\infty}^{\infty}x(t-\tau) \ e^{-j2 \pi f (\tau-t)} \,\mathrm{d}\tau \,\mathrm{d}t \qquad \text{let } u \triangleq \tau-t\\
\\
 &amp;= \int\limits_{-\infty}^{\infty} x(t) e^{-j2 \pi f t} \int_\limits{-\infty}^{\infty}x(-u) \ e^{-j2 \pi f u} \,\mathrm{d}u \,\mathrm{d}t \\
\\
 &amp;= \int\limits_{-\infty}^{\infty} x(t) e^{-j2 \pi f t}  \,\mathrm{d}t \int_\limits{-\infty}^{\infty}x(-u) \ e^{-j2 \pi f u} \,\mathrm{d}u \\
\\
 &amp;= \mathscr{F} \Big\{ x(t) \Big\} \cdot \mathscr{F} \Big\{ x(-t) \Big\} \\
\\
 &amp;= X(f) \cdot X(-f) \\
\\
 &amp;= X(f) \cdot \big( X(f) \big)^*  \\
\\
 &amp;= \Big|X(f)\Big|^2  \\
\end{align}$$