In this example we are multiplying two binomials so FOIL method can be used.
$$ \begin{aligned} \left( \color{blue}{ 5x-8}\right) \cdot \left( \color{orangered}{ 2x-5}\right) &= \underbrace{ \color{blue}{5x} \cdot \color{orangered}{2x} }_{\text{FIRST}} + \underbrace{ \color{blue}{5x} \cdot \left( \color{orangered}{-5} \right) }_{\text{OUTER}} + \underbrace{ \left( \color{blue}{-8} \right) \cdot \color{orangered}{2x} }_{\text{INNER}} + \underbrace{ \left( \color{blue}{-8} \right) \cdot \left( \color{orangered}{-5} \right) }_{\text{LAST}} = \\ &= 10x^2 + \left( -25x\right) + \left( -16x\right) + 40 = \\ &= 10x^2 + \left( -25x\right) + \left( -16x\right) + 40 = \\ &= 10x^2-41x+40; \end{aligned} $$