write 125 as a power in base 5
[tex]q^3+5^3[/tex]then, apply the rule for the addition of cubes
[tex]\begin{gathered} a^3+b^3=(a+b)\cdot(a^2-a\cdot b+b^2) \\ \text{then, } \\ q^3+5^3=(q+5)\cdot(q^2-5x+5^2) \\ q^3+5^3=(q+5)\cdot(q^2-5x+25) \end{gathered}[/tex]