Solution (source code)

= Solution

Only the first and third coordinates occur in the first two columns. Normalize the first column to get $q_1=(4,0,3,0)^T/5$. Removing its component from the second column leaves $(21,0,-28,0)^T/5$, of length seven, so $q_2=(3,0,-4,0)^T/5$. The remaining orthonormal columns can be $q_3=e_2$ and $q_4=e_4$. Taking their dot products with the columns of $A$ gives
$$
\boxed{Q=\begin{pmatrix}4/5&3/5&0&0\\0&0&1&0\\3/5&-4/5&0&0\\0&0&0&1\end{pmatrix},\qquad
R=\begin{pmatrix}5&1&5&2\\0&7&10&-11\\0&0&9&6\\0&0&0&1\end{pmatrix}}.
$$
The columns of $Q$ are orthonormal, and direct multiplication gives the source matrix. Exploiting its two-coordinate first block avoids unnecessary four-dimensional elimination.