Below I have a part of a proof of the fact that the square of an integer, not divisible by $5$, leaves a remainder of $1$ or $4$ when divided by $5$. But I am wondering where does the part highlighted in blue come from?

Below I have a part of a proof of the fact that the square of an integer, not divisible by $5$, leaves a remainder of $1$ or $4$ when divided by $5$. But I am wondering where does the part highlighted in blue come from?

Hint: $(a+b)^2=a^2+2ab+b^2$
1) $(5k+1)^2=(5k)^2+2*5k+1^2=25k^2+10k+1$