[proofplan]
We exploit the fact that $Q$ is orthogonal to replace $\|Ax - b\|^2$ by $\|Rx - Q^\topb\|^2$. The block structure of $R$ then decomposes the residual into two independent components: $\|R_1x - c\|^2$ (controllable by choice of $x$) and $\|d\|^2$ (a fixed irreducible error). When $A$ has full column rank, $R_1$ is invertible and the minimiser is obtained by backward substitution.
[/proofplan]
[step:Use orthogonality of $Q$ to simplify the residual norm]
Since $Q$ is orthogonal, $\|Qy\| = \|y\|$ for all $y$.
Therefore
\begin{align*}
\|Ax - b\|^2 = \|QRx - b\|^2 = \|Q(Rx - Q^\topb)\|^2 = \|Rx - Q^\topb\|^2.
\end{align*}
[/step]
[step:Decompose the residual using the block structure of $R$]
Write $R = \begin{pmatrix} R_1 \\ 0 \end{pmatrix}$ with $R_1 \in \mathbb{R}^{n \times n}$ upper triangular and $Q^\topb = \begin{pmatrix} c \\ d \end{pmatrix}$ with $c \in \mathbb{R}^n$, $d \in \mathbb{R}^{m-n}$.
Then
\begin{align*}
\|Rx - Q^\topb\|^2 = \left\|\begin{pmatrix} R_1x - c \\ -d \end{pmatrix}\right\|^2 = \|R_1x - c\|^2 + \|d\|^2.
\end{align*}
The term $\|d\|^2$ is independent of $x$, so the minimum over $x$ is achieved by minimising $\|R_1x - c\|^2$.
The minimum residual norm is therefore $\|d\|$.
[/step]
[step:Solve for the unique minimiser when $A$ has full column rank]
If $A$ has full column rank, then $R_1$ is non-singular: the diagonal entries of $R_1$ are nonzero because $\operatorname{rank}(A) = \operatorname{rank}(R) = \operatorname{rank}(R_1)$.
Setting $R_1x^* = c$ gives the unique solution $x^* = R_1^{-1}c$, which is computed by backward substitution.
[/step]