Let
\(\boldsymbol{a}_j\) be the columns of
\(A\) and we will call the resulting orthogonal vectors as
\(\boldsymbol{q}_j\text{.}\)
\begin{equation*}
\boldsymbol{q}_1 = \frac{\boldsymbol{a}_1}{||\boldsymbol{a}_1||} = \frac{1}{\sqrt{9^2+18^2+6^2}} \begin{bmatrix} -9 \\ -18 \\ 6 \end{bmatrix} = \begin{bmatrix} -3/7 \\ -6/7 \\ 2/7 \end{bmatrix}
\end{equation*}
For the second vector,
\begin{equation*}
\begin{aligned} \boldsymbol{u}_2 \amp = \boldsymbol{a}_2 - \langle \boldsymbol{q}_1, \boldsymbol{a}_2 \rangle \boldsymbol{q}_1\\ \amp = \begin{bmatrix} 4 \\ 15 \\ 2 \end{bmatrix} - (-14) \begin{bmatrix} -3/7 \\ -6/7 \\ 2/7 \end{bmatrix} = \begin{bmatrix} 4 \\ 15 \\ 2 \end{bmatrix} + \begin{bmatrix} -6 \\ -12 \\ 4 \end{bmatrix} = \begin{bmatrix} -2 \\ 3 \\ 6 \end{bmatrix} \end{aligned}
\end{equation*}
and then this vectors is normalized with
\begin{equation*}
\boldsymbol{q}_2 = \frac{1}{||\boldsymbol{u}_2||} \boldsymbol{u_2} = \frac{1}{\sqrt{2^2+3^2+6^2}} \begin{bmatrix} -2 \\ 3 \\ 6 \end{bmatrix} = \frac{1}{7} \begin{bmatrix} -2 \\ 3 \\ 6 \end{bmatrix} = \begin{bmatrix} -2/7 \\ 3/7 \\ 6/7 \end{bmatrix}
\end{equation*}
Lastly, the third column of \(Q\) can be found with
\begin{equation*}
\begin{aligned} \boldsymbol{u}_3 \amp = \boldsymbol{a}_3 - \langle \boldsymbol{q}_2, \boldsymbol{a}_3 \rangle \boldsymbol{q}_2 - \langle \boldsymbol{q}_1, \boldsymbol{a}_3 \rangle \boldsymbol{q}_1 \\ \amp = \begin{bmatrix} 7 \\ -28 \\ 49 \end{bmatrix} - 28 \begin{bmatrix} -2/7 \\ 3/7 \\ 6/7 \end{bmatrix} - 35 \begin{bmatrix} -3/7 \\ -6/7 \\ 2/7 \end{bmatrix} \\ \amp = \begin{bmatrix} 7 \\ -28 \\ 49 \end{bmatrix} + \begin{bmatrix} 8 \\ -12 \\ -24 \end{bmatrix} + \begin{bmatrix} 15 \\ 30 \\ -10 \end{bmatrix} = \begin{bmatrix} 30 \\ -10 \\ 15 \end{bmatrix} \end{aligned}
\end{equation*}
and lastly, we normalize this vector as
\begin{equation*}
\boldsymbol{q3} = \frac{1}{||\boldsymbol{u}_2||} \boldsymbol{u_2} = \frac{1}{\sqrt{30^2+10^2+15^2}} \begin{bmatrix} 30 \\ -10 \\ 15 \end{bmatrix} = \frac{1}{35} \begin{bmatrix} 30 \\ -10 \\ 15 \end{bmatrix} = \begin{bmatrix} 6/7 \\ -2/7 \\ 3/7 \end{bmatrix}
\end{equation*}
and thus the matrix \(Q\) is the matrix with these three vectors or
\begin{equation*}
Q = \begin{bmatrix} -3/7 \amp -2/7 \amp 6/7 \\ -6/7 \amp 3/7 \amp -2/7 \\ 2/7 \amp 6/7 \amp 3/7 \end{bmatrix}
\end{equation*}
Lastly, we find \(R\) with
\begin{equation*}
\begin{aligned} R \amp = Q^{\intercal} A \\ \amp = \begin{bmatrix} -3/7 \amp -6/7 \amp 2/7 \\ -2/7 \amp 3/7 \amp 6/7 \\ 6/7 \amp -2/7 \amp 3/7 \end{bmatrix} \begin{bmatrix} -9 \amp 4 \amp 7 \\ -18 \amp 15 \amp -28 \\ 6 \amp 2 \amp 49 \end{bmatrix} \\ \amp = \begin{bmatrix} 21 \amp -14 \amp 35 \\ 0 \amp 7 \amp 28 \\ 0 \amp 0 \amp 35 \\ \end{bmatrix}
\end{aligned}
\end{equation*}