The question and its answer is given in the following 2 pictures:

I have read the solution, but I did not understand why there is a relation between factors of 5 in k and decimal representation of $k!$, and I did not understand this line at all:
And why he mentioned the even numbers, could anyone clarify this for me please?

The prime factors of $10$ are $2$ and $5$, so $10$ can be rewritten as $2^15^1$. Since the prime factorization of any number is written as $2^a3^b5^c7^d11^e\dots$, the number of trailing zeros it has when written as a decimal is equal to $min(a,c)$. For each additional $2$ and $5$ the number is divisible by, it is divisible by another factor of $10$, and therefore has another trailing zero.