I'm studying linear regression analysis, and the textbook says $\frac{\hat{\beta}_0+\hat{\beta}_1x_1-(\beta_0+\beta_1x_1)}{\sqrt{\hat{\sigma^2}(\frac{1}{n}+\frac{(x_1-\bar{x_1})^2}{S_{xx}})}} \sim t_{n-2}$ without any proof, so I'm trying to figure out why. I know that $\frac{Z}{\sqrt{V/r}} \sim t_{r}$ where $Z \sim N(0,1)$, $V \sim \chi^{2}(r)$, and $Z$ and $V$ are independent. So what should be $Z$ and $V$ for the case of $\frac{\hat{\beta}_0+\hat{\beta}_1x_1-(\beta_0+\beta_1x_1)}{\sqrt{\hat{\sigma^2}(\frac{1}{n}+\frac{(x_1-\bar{x_1})^2}{S_{xx}})}}$?
I also learned that $\hat{\beta} \sim N(\beta ,\sigma^2(X^TX)^{-1})=N( \begin{pmatrix} \beta_0\\ \beta_1 \end{pmatrix}, \frac{\sigma^2}{S_{xx}}\begin{pmatrix} \sum_{i=1}^{n}{\frac{x_{i1}^{2}}{n}} & -\bar{x_1}\\ -\bar{x_1} & 1 \end{pmatrix})$ and $(n-2)\hat{\sigma^{2}}/\sigma^2 \sim \chi^2(n-2)$, but having trouble applying it to the fraction.