Step 1: Determine the conjugate of the denominator. ( to find the conjugate just change the sign of the imaginary part ).
In this example, the conjugate of $ \color{orangered}{ 5+2i }\, $ is $ \color{blue}{ 5-2i } $.
Step 2: Multiply both the numerator and denominator by the conjugate:
$$\begin{aligned} \frac{ -2+i }{ 5+2i } &= \frac{ -2+i }{ 5+2i } \cdot \frac{ \color{blue}{ 5-2i } }{ \color{blue}{ 5-2i } } = \\[1 em] &= \frac{ \left( -2+i \right) \cdot \left( 5-2i \right) }{ \left( 5+2i \right) \cdot \left( 5-2i \right) } \end{aligned} $$Step 3: Simplify numerator and denominator (use $\color{blue}{i^2 = -1}$)
$$ \begin{aligned} \left( -2+i \right) \cdot \left( 5-2i \right) &= -2 \cdot 5 -2 \cdot \left(-2 \,i \right) + \left( 1 \,i \right) \cdot \left(5 \right) + \left( 1 \,i \right) \cdot \left(-2 \,i \right) = \\[1 em] &= -10 + 4 \, i + 5 \, i -2 \color{blue}{(-1)} = \\[1 em] &= -8+9i\end{aligned} $$ $$ \begin{aligned} \left( 5+2i \right) \cdot \left( 5-2i \right) &= 5 \cdot 5 + 5 \cdot \left(-2 \,i \right) + \left( 2 \,i \right) \cdot \left(5 \right) + \left( 2 \,i \right) \cdot \left(-2 \,i \right) = \\[1 em] &= 25 -10 \, i + 10 \, i -4 \color{blue}{(-1)} = \\[1 em] &= 29\end{aligned} $$Step 4: Separate real and imaginary parts:
$$ \frac{ -2+i }{ 5+2i } = \frac{ -8+9i }{ 29 } = \frac{ -8 }{ 29 } + \frac{ 9 }{ 29 } i= -\frac{ 8 }{ 29 }+\frac{ 9 }{ 29 }i $$