How should I know to perform this factorization? $$C^3 - 2 C + 1 \;=\; (C-1)\left(\left(C+\frac12\right)^2-\frac54\right) \tag{$\star$}$$
Background. We want to find $r'$ and $s'$ so that $(q,r,s,t)$, $(q,r',r,s)$, and $(q,s,s',t)$ are identical up to a linear transform. In order to achieve this we consider the ratios $$ B:= \frac{r-1}{t-q}\quad \text{and} \quad C:= \frac{s-q}{t-q} $$ such that $0<B<C<1$, and $r=(1-B)q+Bt$, and $s=(1-C)q+Ct$. In order to keep the length ratios between $(q,r',r,s)$ and $(q,r,s,t)$ identical, one has in particular to guarantee that $B/C = C/1$. The length ratios in $(r,s,s',t)$ correspond to those in $(q,r,s,t)$ only if $(1-C)/(1-B) = (1-B)/(1-0)$. In other words $$ B = C^2 \quad \text{and} \quad 1-C = (1-B)^2 $$ Injecting the first equality in the second one, we obtain \begin{align*} 0 &= C^4-2C^2 + C \tag{1}\\ &= C(C^3-2C+1) \tag{2}\\ &=C(C-1)\left(\left(C+\frac12\right)^2-\frac54\right) \tag{3} \end{align*}
Factorization $(\star)$ bridges $(2)$ and $(3)$, but how should I have known to do that?
The rational root theorem is your friend.
"The theorem states that each rational solution x = p/q, written in lowest terms so that p and q are relatively prime, satisfies:
p is an integer factor of the constant term, and q is an integer factor of the leading coefficient."
https://en.wikipedia.org/wiki/Rational_root_theorem