Determine if there's a linear map such that... Today in the class we were solving a following problem:
Determine if there's a linear map $\phi : R^3 \rightarrow R^3$ such that $\phi(2,1,0)=(3,2,1), \phi(4,2,1) = (4,1,0), \phi(2,2,1) = (2,3,3), \phi(2,2,2) = (0,0,1)$. It was then solved by creating an augmented matrix with the inputs for $\phi$ written in rows in the left hand side of the matrix and outputs of $\phi$ in the right hand side, also in rows. Then the matrix has been row reduced until an identity appeared in the left hand side... it seemed to me like some black magic. I have no idea why or how it works. This whole method doesn't make any sense to me. Is there any better way of doing it or some explanation why something like this works?

The first three input vectors are linearly independent,
so we can evaluate $\phi$ on the standard basis vectors by linearity:
$\phi(1,0,0)=\phi(\frac12((4,2,1)-(2,2,1))=\frac12((4,1,0)-(2,3,3))=(1,-1,-\frac32);$
$\phi(0,1,0)=\phi((2,2,0)+(2,2,1)-(4,2,1))=(3,2,1)+(2,3,3)-(4,1,0)=(1,4,4)$;
and $\phi(0,0,1)=\phi((2,2,2)-(2,2,1))=(0,0,1)-(2,3,3)=(-2,-3,-2).$
So   $\phi$ corresponds to $\pmatrix{1&1&-2\\-1&4&-3\\-\frac32&4&-2}$.
Check that this matrix applied to the fourth input vector $(2,2,2)$ yields $(0,0,1)$.
