I think I have solved the following differential equation, but I am not sure of all steps are justified.
Exercise: Find all distributions $u \in \mathcal{D}'(\mathbb{R})$ such that
$x(u' -u) = \delta_0 - \delta_2$.
Substituting $v = u' - u$ we get
$ xv = \delta_0 - \delta_2$
Now I take the Fourier transform, however, then the distribution $v$ must be a tempered distribution, otherwise the transformation is not defined. Can we deduce from the right hand side that $v$ is a tempered distribution? For example if $\phi$ is any test function with $\mathrm{supp}(\phi) \cap[0,2] = \emptyset$, then $\langle xv,\phi\rangle = \langle v, x\phi\rangle = \langle \delta_0,\phi\rangle - \langle\delta_2,\phi\rangle = 0$, so $v$ has compact support and the Fourier Transform is justified?
Taking the Fourier transform we get:
$-i\partial_y\hat{v}(y) = 1-e^{i2y}$,
$ \partial_y\hat{v}(y) = i-ie^{i2y}$,
$\hat{v} = iy -\frac{1}{2}e^{i2y}$
If one consider $\hat{v}$ as a distribution, my book says it's a bit of cheating doing as we do above but that it works. Is that because of
$<\hat{v}',\phi> = - <\hat{v}, \phi'> = <i-ie^{i2y},\phi> = \int_{\mathbb{R}} (i-ie^{i2y})\phi dy = $ integration by parts = -$\int_{\mathbb{R}}(iy-\frac{1}{2}e^{i2y})\phi' dy$
so we can identify $\hat{v}(y)$ as $(iy-\frac{1}{2}e^{i2y})$
Now the inverse Fourier gives
$v(x) = -\delta_0' - \frac{1}{2}\delta_2 + c\delta_0$.
The next step now is to solve
$v = u' - u = -\delta_0' - \frac{1}{2}\delta_2 + c\delta_0$
Multiplying with integrating factor gives:
$\partial_x(e^{-x}u) = e^{-x}(-\delta_0' - \frac{1}{2}\delta_2 + c\delta_0) = \delta_0 - \delta_0' - \frac{1}{2}e^{-2}\delta_2 + c\delta_0 = - \delta_0' - \frac{1}{2}e^{-2}\delta_2 + c\delta_0 $.
Now integrating both sides gives
$e^{-x} u = c\theta(x) - \delta_0 - \frac{e^-2}{2}\theta(x-2) + d$
which gives
$u = c\theta(x)e^x - \theta(x-2)\frac{e^{x-2}}{2} + de^x - \delta_0$.
When is it justified to integrate over distributions as we did in the last step?
In the exercise, it says find all distributions in $\mathcal{D'(\mathbb{R})}$, does it follow from the motivation of taking the Fourier transform that the solution must be tempered, so we know that we have found all?
I'd suggest to not use Fourier transfrom at all - exactly for the reason that you need to justify why you use it.
When you study $$xv=\delta_0-\delta_2,$$you don't need Fourier transform to find all solutions.
$$xv_0=\delta_0$$ has a particular solution $v_0=-\delta_0'$, and the homogenous solution $C\delta_0$, hence, $v_0=C\delta_0-\delta_0'$.
In the same spirit, $$xv_2=-\delta_2$$ has the same homogenous solution $C\delta_0$ and a particular solution $-\frac 12 \delta_2$, or $v_2 = C\delta_0-\frac 12 \delta_2$.
Therefore, $$v=v_0+v_2=\delta_0'-\frac 12 \delta_2+C\delta_0,$$where $C$ is an arbitrary constant.
Then you can safely continue with the method you already used.
If you have question why homogenous solution of $xT=0$ is $C\delta_0$ or how we can educatedly guess the particular solutions for $v_0$ and $v_2$, ask in comments.