(I'll do it for dimension $n$ because the difficulty is the same)
Suppose you write $\{e_1,\ldots,e_n\}$ for the canonical basis (could be any basis, actually), and let $\{f_1,\ldots,f_n\}$ be another basis. You take a vector $x=\sum_{j=1}^n x_j\, e_j$ and you want to write it in the other basis.
You are given the vectors $\{f_1,\ldots,f_n\}$ in terms of the canonical basis, which means you have $\{p_{kj}\}$ such that
$$
f_k=\sum_{j=1}^n p_{jk}e_j,\ \ \ k=1,\ldots,n.
$$
Here you can think of $P=(p_{kj})$ as the matrix that has the coefficients of the $f_j$ in its columns. In a similar way we have coefficients $\{q_{jh}\}$ such that
$$
e_j=\sum_{h=1}^nq_{hj}f_h\ \ \ j=1\,\ldots,n.
$$
Combining the two expressions we get
$$
f_k=\sum_{j=1}^n\sum_{h=1}^np_{jk}q_{hj}f_h=\sum_{h=1}^n\sum_{j=1}^nq_{hj}p_{jk}f_h
=\sum_{h=1}^n(QP)_{kh}f_h.
$$
By the uniqueness of the coefficients of a vector in a basis we get that $(QP)_{kh}$ is $1$ when $k=h$ and $0$ otherwise, i.e. $QP=I$. So $Q$ is the inverse matrix of $P$.
Now
$$
x=\sum_{j=1}^n x_j\, e_j=\sum_{j=1}^n x_j\,\sum_{h=1}^n q_{hj}f_h
=\sum_{h=1}^n \sum_{j=1}^n q_{hj}x_jf_h
=\sum_{h=1}^n (QX)_h f_h.
$$
In other words, the coefficients of the vector $x$ in the basis $\{f_1,\ldots,f_n\}$ are given by $P^{-1}X$, where $P$ is the matrix with the entries of the $f_k$ in its column, and $X$ are the entries of $x$ in the canonical basis.
Since
$$
5\cdot \pmatrix{1\\-1\\3}+(-1)\cdot\pmatrix{-3\\4\\9}
= \pmatrix{5\\-5\\15}+\pmatrix{3\\-4\\-9}
= \pmatrix{8\\-9\\6},
$$
your solution is correct.
Maybe you copied the wrong numbers from your textbook?
Best Answer
When you are given an (ordered) basis $$B = \{b_1,b_2,...,b_n\} $$ of some vector space $V$ then every element $x \in V$ can be written as a unique linear combinations of the basis vectors i.e. $ \exists \lambda_1,...,\lambda_n$ such that
$$ x = \lambda_1 b_1 + ... + \lambda_n b_n.$$
The numbers $\lambda_1,...,\lambda_n$ are unique and are called the coordinates of $x \in V$ with respect to $B$. These coordinates define $[x]_B$ the coordinate vector of $x$ with respect to $B$ which is defined by
$$ [x]_B = (\lambda_1,\lambda_2,...,\lambda_n)^T.$$
In your example $b_1 = (1,1)^T$ and $b_2 = (2,-1)^T$ and $[x]_B = (3,2)^T$ this means that $$ x = 3 b_1 + 2b_2 = (3,3)^T + (4,-2)^T = (7,1)^T.$$
Here's another example in $V = P_2(x) = \{ax^2 + bx + c : a,b,c \in \mathbb R\}$ which is the vector space of polynomials of degree at most $2$ (and with real coeeficients).
Consider the basis $B = \{ b_1(x),b_2(x), b_3(x)\}$ where $$b_1(x) = 5, \;b_2(x) = 2x - 1, \; b_3(x) = x^2.$$
If we are given a polynomial whose coordinate vector with respect to $B$ is
$$ (0,1,4)^T$$ then that polynomial must be
$$ 0 \cdot b_1(x) + 1 \cdot b_2(x) + 4 \cdot b_3(x) = 0 + (2x-1) + 4x^2 = 4x^2 + 2x -1.$$