<s>[INST] Let $A,B$ be $2\times2$ matrices. Given that we know $\text{Tr}(A)$, $\text{Tr}(B),\text{Tr}(AB)$, how do I find $A$ and $B$ that have those traces? Let $A,B$ be $2\times 2$ matrices. Given that we know $\operatorname{Tr}(A)$, $\operatorname{Tr}(B),\operatorname{Tr}(AB)$  how do I find $A$ and $B$ that have those traces?
Naively, I would let $A$ be the diagonal matrix with entries $\operatorname{Tr}(A)/2$ and the diagonal entries of $B$ be $\operatorname{Tr}(B)/2$ but this just doesn't work.
(I know those traces do not uniquely determine $A,B$ but I just need one instance of $A,B$)
 [/INST] Edit: I've revamped the answer to include the determinate of $1$ condition.
For an elementary approach: Let $Tr(A)=x$, $Tr(B)=y$, and $Tr(AB)=z$. For some $a,b$, we have
\begin{align*}
A&=\begin{pmatrix}a&a_1\\a_2&x-a\end{pmatrix}&
B&=\begin{pmatrix}b&b_1\\b_2&y-b\end{pmatrix}
\end{align*}
This gives us
$$AB=\begin{pmatrix}ab+a_1b_2&\square\\\square&a_2b_1+(x-a)(y-b)\end{pmatrix}$$
Therefore, $$z=ab+a_1b_2+a_2b_1+(x-a)(y-b)\implies a_1b_2+a_2b_1=z-ab-(x-a)(y-b).$$
Now, if we want the added condition that $|A|=1$ and $|B|=1$, then
\begin{align*}
a(x-a)-a_1a_2=1&\implies a^2-ax+a_1a_2+1=0\\
b(y-b)-b_1b_2=1&\implies b^2-by+b_1b_2+1=0
\end{align*}
Hence,
$$a=\frac{x\pm\sqrt{x^2-4a_1a_2-4}}{2}\quad\text{ and }\quad b=\frac{y\pm\sqrt{y^2-4b_1b_2-4}}{2}.$$

As an example, say $Tr(A)=7$, $Tr(B)=-2$, and $Tr(AB)=4$. Then
\begin{align*}
a_1b_2+a_2b_1&=4-ab-(7-a)(-2-b)\\
&=18-2ab+7b-2a\\
\end{align*}
We have the conditions that
$$a=\frac{7\pm\sqrt{45-4a_1a_2}}{2}\quad\text{ and }\quad b=-1\pm\sqrt{-b_1b_2}.$$
We will just take the "$+$" solution. Therefore, we can substitute these values and simplify (quite a bit) to get
\begin{align*}
a_1b_2+a_2b_1=11-\sqrt{4a_1a_2b_1b_2-45b_1b_2}
\end{align*}
At this point, we have many choices, so let $a_2=0$, $b_1=0$, $b_2=-1$. Then we have
\begin{align*}
a_1=-11
\end{align*}
We can now solve for $a$ and $b$:
$$a=\frac{7+3\sqrt{5}}{2}\quad\text{ and }\quad b=-1.$$
Therefore, we have the matrices
\begin{align*}
A&=\begin{pmatrix}\frac{7+3\sqrt{5}}{2}&-11\\0&7-\frac{7+3\sqrt{5}}{2}\end{pmatrix}&
B&=\begin{pmatrix}-1&0\\-1&-1\end{pmatrix}
\end{align*}
Indeed, both of the matrices have a determinate of $1$. Moreover,
$$AB=\begin{pmatrix}-\frac{7+3\sqrt{5}}{2}+11&\square\\\square&-7+\frac{7+3\sqrt{5}}{2}\end{pmatrix},$$
giving us a trace of $4$.
</s>