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