The question and its answer is given below:
But I do not understand why in the second line of the solution $\widetilde{F}$ is defined as this, could anyone explain this for me please?
The question and its answer is given below:
But I do not understand why in the second line of the solution $\widetilde{F}$ is defined as this, could anyone explain this for me please?
Copyright © 2021 JogjaFile Inc.

Because you need it to do the right thing and you need the co/domains to match up the right way. It may be better to think of $h$ as a map $h: I \to I$. Then $\mathrm{Id} \times h: X \times I \to X \times I$ via $(x,t) \mapsto (x, h(t))$. Now compose with $F$ to get $F \circ (\mathrm{Id} \times h) : X \times I \to Y$ which has all the properties that you want (check it). Hence take this to be $\widetilde{F}$ and be done.