Determine the matrix relative to a given basis
Solution 1:
Yes, your solution to (a) is correct assuming your computations for how to express the elements is correct. Though you don't need to find how to write an arbitrary vector in terms of the basis of $W$, you only need to find out how to write $f(0,2,1)$, $f(-1,1,1)$, and $f(2,-1,1)$ (the images of the vectors in the given basis for $V$) in terms of the given basis of $W$.
No, you never need to use the fact that $V$ and $W$ are isomorphic (we don't consider a metric here, so "isometric" is not appropriate here).
Your answer for (b), on the other hand, is not well done (or correct).
The basis for your vector space is $\{1,t,\ldots,t^n\}$. To find the matrix representation of $f$ relative to this basis, you need to find the image of each basis vector in the domain, and express it in terms of the basis vectors of the range. But remember: the vectors in $U_n$ are not tuples, they are polynomials. So $(1,t,\ldots,t^n)$ is not an element of $U_n$.
So, you would have to find each of $f(1)$, $f(t)$, $f(t^2),\ldots, f(t^n)$, and then express them in terms of the basis of the range, which happens to again be $\{1,t,t^2,\ldots,t^n\}$. So for instance, $f(t^2) = 2t$, so $$f(t^2) = 0\cdot 1 + 2\cdot t + 0\cdot t^2 + \cdots + 0\cdot t^n.$$ That means that the third column of the matrix (the one corresponding to the third basis vector, which is $t^2$) will be the transpose of $(0,2,0,\ldots,0)$, that is $$\left(\begin{array}{c} 0\\2\\0\\ \vdots \\ 0\end{array}\right).$$ Etc.
Solution 2:
Here's a suggestion for seeing the bigger picture in your first question:
The key idea below is that the column vectors of a matrix $M$ are the images of the standard ordered basis when the matrix $M$ is viewed as a transformation $M: \mathbb{R}^n \to \mathbb{R}^n$.
It is easy to find a matrix of f with respect to the standard ordered basis of $\mathbb{R}^3$: it is given by a matrix with columns $\{1, 2, 0\}$, $\{0, -5, 1\}$, and $\{-1, -1, 1\}$. Call this matrix $C$.
The matrix which transforms the given ordered basis of $V$ to the standard basis of $\mathbb{R}^3$ is given by writing the basis vectors as columns of this matrix. Similarly, this can be done for the basis of $W$. Let's call these matrices $A$ and $B$.
You desire a matrix which represents $f$. Interpreting the matrices above as transformations, consider the following diagram:
$$\begin{array}{ccc} V & \to & \mathbb{R}^3\\ \downarrow & \qquad & \downarrow\\ W & \to & \mathbb{R}^3 \end{array}$$
where the horizontal maps are $A$ and $B$ and the right vertical map is $C$. Your desired matrix is the left vertical arrow. It is now clear that it is given by the matrix $B^{-1} C A$.