The Riemann hypothesis is *equivalent* to the following statement:
$$f(x)=\mathrm{li(x)}-\frac{x}{\log x}+O(\sqrt{x}),\qquad x\geq 2.$$
Note that
$$\mathrm{li(x)}=\mathrm{li(2)}+\frac{x}{\log x}-\frac{2}{\log 2}+\int_2^x\frac{dt}{\log^2 t},$$
hence the claim is that the Riemann hypothesis is equivalent to
$$f(x)=\int_2^x\frac{dt}{\log^2 t}+O(\sqrt{x}),\qquad x\geq 2.\tag{$\ast$}$$

**1.** The Riemann hypothesis implies $(\ast)$ as follows:
\begin{align*}
f(x)&=\int_{2-}^x\frac{d\psi(t)}{\log^2 t}\\
&=\int_2^x\frac{dt}{\log^2 t}+\int_{2-}^x\frac{d(\psi(t)-t)}{\log^2 t}\\
&=\int_2^x\frac{dt}{\log^2 t}+\left[\frac{\psi(t)-t}{\log^2 t}\right]_{2-}^x+2\int_2^x\frac{\psi(t)-t}{t\log^3 t}\,dt.
\end{align*}
Here $\psi(t)-t=O(\sqrt{t}\log^2 t)$ by the Riemann hypothesis, hence we conclude $(\ast)$.

**2.** Let us denote by $g(x)$ the integral in $(\ast)$. Then $(\ast)$ implies RH as follows:
\begin{align*}
\psi(x)&=\int_{2-}^x(\log^2 t)\,df(t)\\
&=\int_2^x(\log^2 t)\,dg(t)+\int_{2-}^x(\log^2 t)\,d(f(t)-g(t))\\
&=x-2+\left[(\log^2 t)\,(f(t)-g(t))\right]_{2-}^x-2\int_2^x\frac{\log t}{t}(f(t)-g(t))\,dt.
\end{align*}
Here $f(t)-g(t)=O(\sqrt{t})$ by $(\ast)$, hence we infer that $\psi(x)=x+O(\sqrt{x}\log^2 x)$, which is a form of the Riemann hypothesis.