Let $T: C^{\infty}(\mathbb{R}) \to C^{\infty}(\mathbb{R})$ be a linear mapping such that $f \mapsto f - f''$.
Is $T$ injective?
I know that to prove injectivity, I must show that if $f(x_1) = f(x_2)$, then $x_1 = x_2$. I am however confused about how to proceed.
$\underline{\textit{Before we begin, a point about your notation:}}$
This is fine if the name of your function, linear transformation, etc is $f$. But here, the name of the function whose injectivity you want to show/disprove is $T$. So you should replace $f$ with $T$ above. Also using the symbols $x_1, x_2$ is potentially confusing here because you already used a different symbol for the arguments of $T$ when you wrote $f \mapsto f - f''$. So you should replace $x_1, x_2$ above with $f_1, f_2$. In any case, $T$ maps functions to functions and using $f_1, f_2$ reflects this fact far better than using $x_1, x_2$. So your definition for injectivity should look like
$\underline{\textit{Now, back to your question:}}$
No $T$ is not injective. You can find (at least) two different smooth functions that get sent to the same image which negates the injectivity condition.
The zero (real) function $\textbf{0} : \Bbb R \to \Bbb R$ (which maps any real $x$ to $0$) obviously gets sent to $\textbf{0}$ by $T$.
But note that the non-zero (real) exponential function $\exp : \Bbb R \to \Bbb R$ (where $\exp(x) = e^x$) also gets sent to $\textbf{0}$ by $T$ because $\exp(x) - (\exp(x))'' = \exp(x) - \exp(x) = 0$ for any real $x$. Indeed, the same goes for the smooth functions $e^{-x}$, $\sinh(x)$ and $\cosh(x)$. They are all distinct smooth functions that get sent to $\textbf{0}$ by $T$.
In other words, we have found smooth $f_1, f_2$ such that $f_1 \neq f_2$ even though $T(f_1) = T(f_2)$. This is the opposite of saying that $T$ is injective.