I want to show that $f:X\rightarrow Y$ is a nullhomotopic if and only if it extends to a map $F:CX\rightarrow Y$ such that $F\circ i=f$ and $i:X\rightarrow CX$ defined $i(x)=[(x,0)]$.
My attempt:\
assume that there is exist f extends to a $F:CX\rightarrow Y$ such that $F\circ i=f$ and $i:X\rightarrow CX$ defined $i(x)=[(x,0)]$, let define a $H:X \times I\rightarrow Y$ for all $(x,t)\in X\times I$, $H(x,t)=F([\frac{(x,t)}{t+1}])$ in particular $H(x,0)=F(x,0)=f(x)$ and $H(x,1)=F([\frac{(x,1)}{2}])=F(P)$ where $P$ is a point of the cone. so H define the homotopy between f and constant map so f is nullhomotopic.
assume that a map $f:X\rightarrow Y$ is nullhomotopic so $F(x,t) = f(x)$ for all $x \in X$ and $t \in [0,1)$.
$F(x,1) = a$ fixed point y in Y, We need to show that F is well-defined (i.e., it is continuous and does not depend on the choice of representative of the equivalence class).
To show that F is continuous, we note that F is continuous on $X \times [0,1)$, since it is the restriction of the continuous map $f:X\rightarrow Y$. We only need to check the continuity at the identified point $(x,1) \in X \times {1} $.
Let $U$ be an open neighborhood of $F(x,1) = y$, $y \in Y$ . Since f is nullhomotopic, there exists a continuous map $G:X\times [0,1]\rightarrow Y$ such that $G(x,0) = f(x)$ and $G(x,1) = y$ for all $x \in X$.
Since G is continuous, there exists an open neighborhood $V$ of $(x,1) \in X \times [0,1]$ such that $G(V)$ is contained in $U$. Now, we can define $F$ on $V$ as follows:
$F(x,t) = G(x,t)$ for all $(x,t) \in V$. Note that $F$ is continuous on $V$ because $G$ is continuous and $V$ is an open subset of $X\times [0,1]$. Moreover, $F$ is well-defined because if $(x,t)$ and $(x',t')$ are two points in $V$ such that $(x,1) = (x',1)$, then $x = x'$ by definition of the cone CX, and hence $(x,t) = (x',t')$.
Therefore, we have shown that $F$ is a well-defined continuous extension of $f:X\rightarrow Y$ to the cone $CX$.
Is my attempt correct? please feel free to correct me or suggest another solution.
Yes, it seems correct.
For 2., the essential idea is that the existence of a continuous map $H : X \times [0,1] \rightarrow Y$ with $H(x,0) = f(x)$ for all $x \in X$ and $H(x,1)$ is constant for all $x \in X$ implies that $X \times \{1\}$ is contained in a fiber of $H$, which inturn, by the universal property of Quotient spaces, says that $H$ factors uniquely through the canonical map $X \times [0,1] \to (X \times [0,1])/(X \times \{1\}) \cong CX$ via a continuous map $F : CX \rightarrow Y$.
This map $F$ is the required one.