Solution (source code)

= Solution

For the <upper triangular matrix> $A=\begin{pmatrix}a&b\\0&d\end{pmatrix}$, direct <matrix multiplication> gives
$$
A^3=\begin{pmatrix}a^3&b(a^2+ad+d^2)\\0&d^3\end{pmatrix}.
$$
The real diagonal entries are therefore $a=3,d=4$. Their off-diagonal multiplier is $9+12+16=37$, so $b=-74/37=-2$. A required matrix is
$$
\boxed{A=\begin{pmatrix}3&-2\\0&4\end{pmatrix}.}
$$
It is the unique real upper triangular cube root. Allowing complex diagonal cube roots produces other complex matrices; uniqueness is asserted only over the real numbers.