The formulas given already explain the substitution you're wondering about, based on standard statistical laws surrounding the distribution of random variables, often focused on the first and second moments of that distribution: the mean $E(\cdot)$ and variance $Var(\cdot)$. You can find these rules being followed in the derivations of many economic models that are probabilistic.
Taking the expected value of random variable $x_t$ as $E(x_t)$ is simply due to the regression coefficient $\beta$ coming out as a scalar coefficient since it doesn't have an expected value being a scalar, whereas random variable $y_t$ is not deterministic and does have an expected value, therefore $E(y_t)$ is there. Intercept term $\alpha$ is intact when taking expectations, but not in the variance shown next.
The rules for taking the variance of a random variable consisting of a constant and random component are as follows, which has a longer derivation that can be found in the appendix of many mainstream econometrics textbooks:
- Variance of the scalar $\beta$ is the same scalar but squared, thus $Var(\beta)=\beta^2$ comes out in front of the random variable it is connected to
- Variance of a random variable is just as it is shown, $Var(y_t)$
- The $\sigma^2$ always comes out at the end as a residue of sorts from taking the variance of a random variable and intercept term $\alpha$ (having alot to do with the covariance of the model) again fully derived in the back of many econometrics textbooks.
Since the Sharpe ratio's numerator is the expected value of random variable $x_t$ and the denominator is the variance of the same random variable $x_t$
consisting of a deterministic and stochastic term, the $E(x_t)$ and $Var(x_t)$ are just put into place.