By the way, I cannot understand why there is a $k$ in this equation, can any one explain it to me?

Factor $k$ comes from the same factor in $ku_{xx}$ term in the heat equation.

I guess I know this $k$ is the same factor in $ku_{xx}$ term in the heat equation, I am curious where / when this $k$ is introduced in the derivation of the final formula (I cannot see any hint from the textbook...)

By the way, I guess the two unlabeled equations above

http://www.math.toronto.edu/courses/apm346h1/20169/PDE-textbook/Chapter3/S3.2.html#mjx-eqn-eq-3.2.14 should all have zero in the position of $y$. I guess you have already plug in the value $y = 0$ inside the integral.