[tex]\displaystyle \mathtt{f(x)=e^x\left(x^2-5x+7\right)}\\ \\ \mathtt{f'(x)=\left[e^x\left(x^2-5x+7\right)\right]'=\left(e^x\right)'\left(x^2-5x+7\right)+e^x\left(x^2-5x+7\right)'=}\\ \\ \mathtt{=e^x\left(x^2-5x+7\right)+e^x\left(2x-5\right)=e^xx^2-5e^xx+7e^x+2e^xx-5e^x=}\\ \\ \mathtt{=e^xx^2-3e^xx+2e^x}[/tex]