Consider a linear transformation from $R^3\to R^2$ in the form,
T$\begin{bmatrix}x \\ y \\ z\end{bmatrix}$=$\begin{bmatrix}x+y\\y+z\end{bmatrix}$
This would produce a matrix of transformation, under the standard basis $e_3$, $e_2$, in the form
$MatT=\begin{bmatrix}1 &1&0\\0&1&1\end{bmatrix}$
Say the same linear transformation T has a matrix of transformation under unknown basis is $MatT_{b_3,b_2}$=$\begin{bmatrix}-1 &0&1\\1&1&0\end{bmatrix}$
What are basis $b_3$ and $b_2$ that would give this matrix of transformation? Are they unique?
Let’s look at what this matrix is telling us about the bases. Recall that the columns of the matrix are the coordinates of the images of the basis vectors, and that coordinates are simply the coefficients of the basis vectors in the unique linear combination of them that makes the vector. So, if our ordered bases are $(v_1,v_2,v_3)$ and $(w_1,w_2)$, we must have $Tv_1=w_2-w_1$, $Tv_2=w_2$ and $Tv_3=w_1$.
We can dispense with uniqueness immediately: suppose we have a pair of bases that produce the desired matrix. If $k$ is a nonzero scalar, then then $T(kv_2)=kw_2$, so if we replace $v_2$ by $kv_2$ in the first basis, we can replace $w_2$ by $\frac1kw_2$ in the second and end up with the same matrix.
Comparing the two matrices, it looks like we can take the standard basis for $\mathbb R^2$ and then try $v_2=e_3$ and $v_3=e_1$. To complete this basis, $v_1$ must have a nonzero second component, so we can try $v_1=(x,1,z)$. Solve $Tv_1=(-1,1)^T$ to find the third basis vector.
More generally, $T$ is full rank, so for every vector $w\in\mathbb R^2$ there is some vector $v$ such that $Tv=w$. Moreover, if we fix a vector $n\in\ker T$, then every vector of the form $v+\lambda n$ is also a preimage of $w$. So, having chosen an ordered basis $(w_1,w_2)$, any linearly-independent set of solutions to the three equations from the first paragraph is a basis of $\mathbb R^3$ that produces the desired matrix. This comes down to adjusting the three coefficients of the null vector $n$. In practice, you will usually be able to pick convenient values for two of them and then solve for the third. Try a few examples for yourself to understand this process.