# What is meant by "let $X_2$ and $v$ be the residuals obtained from regressing $X_3$ on $X_1$"?

This exercise 4.14 from the text Regression Analysis by Example 5E by Chatterjee and Hadi. The data set can be obtained using the following code in R:

data = fread(paste0("http://www1.aucegypt.edu/faculty/hadi/RABE5/Data5/", "P128.txt"))


The part that is causing confusion for me is bolded.

Consider fitting the model $Y = \beta_0 + \beta_1 X_1 + \beta_2 X_2 + \beta_3 X_3 + \epsilon$ to the data set in Table 4.8. Now let $u$ be the residuals obtained from regressing $Y$ on $X_1$. Also, let $X_2$ and $v$ be the residuals obtained from regressing $X_3$ on $X_1$. Show (or verify using the data set in Table 4.8 as an example) that:

(a) $\hat \beta_3 = \sum_{i=1}^{n} u_iv_i / \sum_{i=1}^{n} v_i^2$

(b) the standard error of $\hat \beta_3$ is $\hat \sigma / \sqrt{\sum_{i=1}^n v_i^2}$

How can we let a predictor be residuals?

I am wondering if it should read as follows: "Also, let $v$ be the residuals obtained from regressing $X_3$ on $X_1$ and $X_2$".

v <- lm(X3~X1+X2,data)\$residuals