Find numbers A and B such that the integral is minimal
$$ \int_{0}^{\infty}\left\vert% \,\vphantom{\Large A}{\rm e}^{-x} - A{\rm e}^{-2x} - B{\rm e}^{-3x}\, \right\vert^{2}\,{\rm d}x $$
I have tried to find an orthonormal basis so I can compute the projection between the functions without success. All help is very appreciated, and what is the best way of finding an orthonormal basis of similar problems ?.
Instead of computing an ONB it is easier to work from basic principles: the vector connecting $e^{-x}$ to the nearest point in the plane is orthogonal to the plane. Thus, $e^{-x}-Ae^{-2x} -Be^{-3x}$ must be orthogonal to both $e^{-2x}$ and $e^{-3x}$. This requirement amounts to $$\frac13 - \frac{A}{4}-\frac{B}{5}=0\quad \text{and}\quad \frac{1}{4}-\frac{A}{5}-\frac{B}{6}=0$$ Hence $A=10/3$ and $B=-5/2$.
My original answer was wrong, I corrected it after seeing Felix Martin's answer, thinking there is still some merit to this approach.