All you have to do is row reduce! Put everything into one matrix, and get rid of as many rows as you can.
Logically, in a basis, first of all there cannot be the zero vector. Secondly, no vector in a basis can be a linear combination of any other vectors. In your example, $X_4 = X_3 + X_2$, so you can leave out $X_4$. You are left with your basis: $X_2, X_3$
If you want to row reduce with a more complex question, you have the following matrix:
$\left[ \begin{array}{cccc} 0 & 0 & 0 & 0 \\ 0 & 0 & 1 & 1 \\ 1 & 1 & 0 & 0 \\ 1 & 1 & 1 & 1 \end{array} \right]$
Move the zero row to the bottom for convenience.
$\left[ \begin{array}{cccc} 0 & 0 & 1 & 1 \\ 1 & 1 & 0 & 0 \\ 1 & 1 & 1 & 1 \\ 0 & 0 & 0 & 0 \end{array} \right]$
Now subtract the first row + the second row from the third row.
$\left[ \begin{array}{cccc} 0 & 0 & 1 & 1 \\ 1 & 1 & 0 & 0 \\ 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 \end{array} \right]$
We cannot row reduce anymore. Your answer is the rows that are not completely 0's. The first row, which maps to $X_2$, and the second row, which maps to $X_3$, is your basis. Remember, for the basis, you should use the original vectors, so the original $X_2$ and $X_3$ (coincidentally they are the same this time).
So your basis is $X_2, X_3 = \begin{bmatrix} 0 \\ 0 \\ 1 \\ 1\end{bmatrix},\begin{bmatrix} 1 \\ 1 \\ 0 \\ 0 \end{bmatrix}$
In cases A and B, you can find the matrix of the linear transformation with respect to the canonical bases; in case A it is
$$
A=\begin{bmatrix}
2 & -1 \\
-8 & 4
\end{bmatrix}
$$
and in case B it is
$$
B=\begin{bmatrix}
4 & 1 & -2 & -3 \\
2 & 1 & 1 & -4 \\
6 & 0 & -9 & 9
\end{bmatrix}
$$
In general, when you have a linear transformation $T\colon\mathbb{R}^n\to\mathbb{R}^m$ and $\{e_1,e_2,\dots,e_n\}$ is the canonical basis of $\mathbb{R}^n$, you just write down (as columns), the vectors $T(e_1), T(e_2), \dots, T(e_n)$. A basis for the range can easily be computed by Gaussian elimination.
For case C, you don't have a "canonical basis", but you still can compute the matrix associated to the bases $\{1,x,x^2\}$ of $P_2$ (assuming it's the space of polynomials having degree at most 2) and $\{1,x,x^2,x^3\}$ of $P_3$. Since $T(1)=x=0\cdot1+1x+0x^2+0x^3$, $T(x)=x^2$, $T(x^2)=x^3$, the matrix is
$$
C=\begin{bmatrix}
0 & 0 & 0 \\
1 & 0 & 0 \\
0 & 1 & 0 \\
0 & 0 & 1
\end{bmatrix}
$$
The rank of this matrix is? And what can you conclude from this?
Best Answer
Figure out how $T$ acts on the basis vectors $v_1 = (4,1,0)$ and $v_2 = (2,0,1)$.
The vector $T(v_1)$ should be a linear combination of $v_1$ and $v_2$. Find $a$ and $b$ with $T(v_1) = av_1 + bv_2$.
Similarly, write $T(v_2) = cv_1 + dv_2$.
The matrix $A$ is:
$$\left(\begin{array}{cc} a & c \\ b & d \end{array}\right)$$
Edit: corrected order of variables in matrix