Second moments (i.e E[X^2]) for this WSS random process
\$X(t)\$ is a wide-sense stationary (WSS) process, so its first and second moments are independent of time. Consequently, \$E[X^2(t)]\$ has the same value for any value of \$t\$:

$$E[X^2(t)]=E[X^2(t+\tau)]=R_X(0)$$

That's how you get the term \$2R_X(0)\$ in the solution.