I have to compute the convolution $$\chi_{[1,2]}(x)e^{-x}*xe^{-x}$$ which is $$f(t)=\int_{-\infty}^\infty \chi_{[1,2]}(x)e^{-x}(t-x)e^{-(t-x)} \, dx$$ and becomes $$\int_{1}^2 e^{-x}(t-x)e^{x-t} \, dx=e^{-t}\int_{1}^2 (t-x) \, dx = e^{-t}(t-\frac{3}{2})$$ however, the right solution should be $$f(x)=\begin{cases} 0 & t<1\\ \frac{(t-1)^2}{2}e^{-t} & 1\le t<2\\ (t-\frac{3}{2})e^{-t} & t\ge 2 \end{cases}$$
Is there something I am missing? I don't understand what is wrong.
You wrote $\chi_{[1,2]}(x)e^{-x}*xe^{-x}.$
I wonder if the second function was intended to be understood as $\chi_{[0,+\infty)}(x) xe^{-x}.$ There are contexts in which one works only with functions whose domain is $[0,+\infty)$ and then that understanding is often conventional. In such contexts one has $$ (f*g)(t) = \int_0^t f(x)g(t-x)\,dx. $$
Then you would have \begin{align} & \int_{-\infty}^{+\infty} \chi_{[1,2]}(x) e^{-x} \chi_{[0,+\infty)}(t-x)\cdot (t-x) e^{-(t-x)} \, dx \\[8pt] = {} & \int_0^t \chi_{[1,2]}(x) e^{-x} (t-x) e^{-(t-x)} \, dx. \end{align} If $t\ge2$ then $t-x\ge0$ whenever $1\le x\le 2$ and you get exactly the answer that you got.
If $1\le t<2$ then $t-x\ge 0$ when $1\le x\le t$ so you evaluate $\displaystyle\int_1^t \cdots \, dx.$
If $t<1$ then $t-x <0$ when $1\le x\le 2$ so the value of the integral would be $0.$