As usual, build any matrix representation of $L$, most likely using “nice” bases, such as
\begin{align*}
B&=\set{
\begin{bmatrix} 1 & 0 \\ 0 & 0 \end{bmatrix},\,
\begin{bmatrix} 0 & 1 \\ 0 & 0 \end{bmatrix},\,
\begin{bmatrix} 0 & 0 \\ 1 & 0 \end{bmatrix},\,
\begin{bmatrix} 0 & 0 \\ 0 & 1 \end{bmatrix}
}\\
C&=\set{1,\,x,\,x^2}
\end{align*}
Then the matrix representation (Definition MR) is,
\begin{equation*}
\matrixrep{L}{B}{C}=
\begin{bmatrix}
1 & 2 & 4 & 1 \\
3 & 0 & 1 & -2 \\
-1 & 1 & 3 & 3
\end{bmatrix}
\end{equation*}
Theorem RCSI tells us that we can compute the column space of the matrix representation, then use the isomorphism $\vectrepinvname{C}$ to convert the column space of the matrix representation into the range of the linear transformation. So we first analyze the matrix representation,
\begin{equation*}
\begin{bmatrix}
1 & 2 & 4 & 1 \\
3 & 0 & 1 & -2 \\
-1 & 1 & 3 & 3
\end{bmatrix}
\rref
\begin{bmatrix}
\leading{1} & 0 & 0 & -1 \\
0 & \leading{1} & 0 & -1 \\
0 & 0 & \leading{1} & 1
\end{bmatrix}
\end{equation*}
With three nonzero rows in the reduced row-echelon form of the matrix, we know the column space has dimension 3. Since $P_2$ has dimension 3 (Theorem DP), the range must be all of $P_2$. So any basis of $P_2$ would suffice as a basis for the range. For instance, $C$ itself would be a correct answer.
A more laborious approach would be to use Theorem BCS and choose the first three columns of the matrix representation as a basis for the range of the matrix representation. These could then be “un-coordinatized” with $\vectrepinvname{C}$ to yield a (“not nice”) basis for $P_2$.