Suppose that $A$ is some triangularizable matrix in $M_n(\mathbb R)$. The usual approach I know of to find a triangular matrix similar to it is to find bases for all the eigenspaces, then find their union. If the union does not form a basis of $\mathbb R^n$, then we would add some extra elements from the canonical basis of $\mathbb R^n$ to that union to form a basis of $\mathbb R^n$. Afterwards, we would consider the transition matrix from the canonical basis to that new basis, etc. Now according to the choice of the extra elements, and according to the order of the elements, we would get a different triangular matrix each time. If one is asked to find a certain triangular matrix which $A$ is similar to it, how can one know beforehand the particular choices which will yield that matrix?
For instance, if the eigenvalues of a $A$ are $1,2,3$ each with multiplicity two, how can I find the triangular matrix that has these eigenvalues organized on the diagonal as: $1, 3, 2, 2, 3, 1$, without having to perform trial-error attempts?
Thank you.