To compute the expectation and the variance, in addition to the given
hint (Ito Isometry), you need to know that if the integrator
$W_t$ is an arbitrary martingale, and the integrand $f$ is bounded,
then the integral is a martingale, and the expectation of the integral
is again zero (proof). Then we can proceed.
For: $$r_t=\theta+(x-\theta)e^{-\kappa t}+\sigma\int_0^te^{-\kappa(t-s)}\,dW_s$$
The Expectaction of $r_t$
$$\begin{align}
\mathbb{E}[r_t]&=\mathbb{E}\left[\theta+(x-\theta)e^{-\kappa t}+\sigma\int_0^te^{-\kappa(t-s)}\,dW_s\right]\\
&=\theta+(x-\theta)e^{-\kappa t}+\sigma\mathbb{E}\left[\int_0^te^{-\kappa(t-s)}\,dW_s\right]\\
&=\theta+(x-\theta)e^{-\kappa t}
\end{align}$$
The variance of $r_t$
$$\begin{align}
Var[r_t]&=\mathbb{E}[r_t^2]-\left(\mathbb{E}[r_t]\right)^2\\
&=\mathbb{E}\left[\left(\theta+(x-\theta)e^{-\kappa t}+\sigma\int_0^te^{-\kappa(t-s)}\,dW_s\right)^2\right]-\left(\theta+(x-\theta)e^{-\kappa t}\right)^2\\
&=(\theta+(x-\theta)e^{-\kappa t})^2+2\sigma(\theta+(x-\theta)e^{-\kappa t})^2\mathbb{E}\left[\int_0^te^{-\kappa(t-s)}\,dW_s\right]+\sigma^2\mathbb{E}\left[\left(\int_0^te^{-\kappa(t-s)}\,dW_s\right)^2\right]-(\theta+(x-\theta)e^{-\kappa t})^2\\
&=\sigma^2\mathbb{E}\left[\int_0^te^{-2\kappa(t-s)}\,ds\right]\\
&=\sigma^2\int_0^te^{-2\kappa(t-s)}\,ds\\
&=\dfrac{\sigma^2}{2\kappa}(1-e^{-2\kappa t})
\end{align}$$
The ODE approach is fine, but involved. There is a more convenient way to derive the results, especially so for $E_s[r_t^2]$. The trick is to work with $x_t=e^{\beta t}r_t$ and its corresponding sde is simply,
$$dx_t=e^{\beta t}(\alpha dt +\sigma r_t^{\frac{1}{2}} dB_t) $$
Its solution in terms of $x_s$ can then be written as,
$$x_t= x_s + \alpha \int_s^t e^{\beta \tau} d\tau + z_{s,t} $$
where $E_s[z_{s,t}]=0 $. Therefore,
$$E_s[x_t]= x_s + \frac{\alpha}{\beta}(e^{\beta t}-e^{\beta s} ). \tag{1} $$
The process for $x_t^2$ according to Ito's formula is,
$$dx_t^2=e^{\beta t}x_t(2\alpha + \sigma^2) dt + 2\sigma e^{2\beta t} r_t^{\frac{3}{2}} dB_t $$
It's solution in terms of $x_s$ is,
$$x_t^2= x_s^2 + (2\alpha + \sigma^2) \int_s^t e^{\beta \tau}x_{\tau} d\tau + zz_{s,t} $$
where, again, $E_s[zz_{s,t}]=0 $. Then, its expectation becomes,
$$E_s[x_t^2]= x_s^2 + (2\alpha + \sigma^2) \int_s^t e^{\beta \tau}E_s[x_{\tau}] d\tau . $$
Plugging the result (1) to obtain,
$$E_s[x_t^2]= x_s^2 + (2\alpha + \sigma^2) \int_s^t e^{\beta \tau}
\left[ x_s + \frac{\alpha}{\beta}(e^{\beta \tau}-e^{\beta s} )\right] d\tau . $$
Carrying out the integration to get,
$$E_s[x_t^2]= x_s^2 + (2\alpha + \sigma^2) \left[ \frac{1}{\beta}(e^{\beta t}-e^{\beta s} )x_s + \frac{\alpha}{2\beta^2}(e^{\beta t}-e^{\beta s} )^2 \right] \tag{2}$$
In the end, rewrite (1) and (2) in terms of the original variable $r_t$ to get the final results,
$$E_s[r_t]= e^{-\beta (t-s)}r_s + \frac{\alpha}{\beta} \left[1-e^{-\beta (t- s)} \right]$$
$$E_s[r_t^2]= e^{-2\beta (t-s)}r_s^2 + (2\alpha + \sigma^2) \left[ \frac{1}{\beta}(e^{-\beta (t-s)}-e^{-2\beta (t-s)} )r_s + \frac{\alpha}{2\beta^2}(1-e^{-\beta(t-s)} )^2 \right].$$
Best Answer
The last equality $$ \sigma^2 \mathrm{e}^{-2 \kappa t} \mathrm{E}\left[\left\{\int_0^t \mathrm{e}^{\kappa u} \sqrt{r_u} \,d W_u\right\}^2\right] = \sigma^2 \mathrm{e}^{-2 \kappa t} \int_0^t \mathrm{e}^{2 \kappa u} \mathrm{E}\left(r_u\right) \,d u $$ follows by Ito isometry property of Ito integrals.