Let us look more precisely to your sequence. Let $(x_0,y_0) \in X \times Y$, let
$p_X : (X \times Y,(x_0,y_0)) \to (X,x_0)$ and $p_Y : (X \times Y,(x_0,y_0)) \to (Y,y_0)$ be the projection maps. Define $i_X : (X,x_0) \to (X \times Y,(x_0,y_0)), i_X(x) = (x,y_0)$ and $i_Y : (Y,y_0) \to (X \times Y,(x_0,y_0)), i_Y(x) = (x_0,y)$. Then $p_X i_X = id$ and $p_Y i_Y = id$, thus $(p_X)_* (i_X)_* = id$ and $(p_Y)_* (i_Y)_* = id$. This show in particular that $(i_X)_*, (i_Y)_*$ are injective and $(p_X)_*, (p_Y)_*$ are surjective. Hence
$$1 \to \pi_1(X,x_0) \stackrel{(i_X)_*}{\to} \pi_1(X \times Y,(x_0,y_0)) \stackrel{(p_Y)_*}{\to} \pi_1(Y,y_0) \to 1 $$
is exact at $\pi_1(X,x_0)$ and $\pi_1(Y,y_0)$. The map $p_Y i_X$ is the constant map $(X,x_0) \to (Y,y_0)$, thus $(p_Y)_* (i_X)_* = 0$, i.e. $\text{im} (i_X)_* \subset \ker (p_Y)_*$.

*That is all you can get by applying general properties of the fundamental group functor.* To show that $\ker (p_Y)_* \subset \text{im} (i_X)_*$ you must know the following

**Fact 1.** Maps $\phi: Z \to X \times Y$ are in $1$-$1$-correspondence with pairs of maps $(\phi_X : Z \to X, \phi_Y : Z \to Y)$. The assocation is $\phi \mapsto (p_X \phi, p_Y \phi)$.

This is the universal property of the product. Applying it to maps and homotopies we easily get

**Fact 2.** The map
$$\alpha: \pi_1(X \times Y,(x_0,y_0)) \to \pi_1(X,x_0) \times \pi_1(Y,y_0), \alpha([f]) = ([p_Xf], [p_Yf]) = ((p_X)_*([f], (p_Y)_*([f])$$
is a group isomorphism.

*Without using Fact 1 or Fact 2 you do not have any chance to prove $\ker (p_Y)_* \subset \text{im} (i_X)_*$.*

Proof based on Fact 2: Let $r_Y : \pi_1(X,x_0) \times \pi_1(Y,y_0) \to \pi_1(Y,y_0)$ be the projection and $j_X : \pi_1(X,x_0) \to \pi_1(X,x_0) \times \pi_1(Y,y_0), j_X(a) = (a,0)$. But now the diagram
$\require{AMScd}$
\begin{CD}
\pi_1(X,x_0) @>{(i_X)_*}>> \pi_1(X \times Y,(x_0,y_0)) @>{(p_y)_*}>> \pi_1(Y,y_0)\\
@V{=}VV @V{\alpha}VV @V{=}VV\\
\pi_1(X,x_0) @>{j_X}>> \pi_1(X,x_0)\times \pi_1(Y,y_0) @>{r_Y}>> \pi_1(Y,y_0) \end{CD}
commutes. Since obviously $\ker(r_Y) = \text{im}(j_X)$, we see that $\ker (p_Y)_* = \text{im} (i_X)_*$.

Proof based on Fact 1: Your idea was to find for $[f] \in \ker (p_Y)_*$ an element $[f_X] \in \pi_1(X,x_0)$ such that $(i_X)_*([f_X]) = [f]$. Looking at the above diagram we see that necessarily $[f_X] = (p_X)_*([f]) =[p_X f]$, but let us assume we have made a good guess by taking $f_X = p_Xf$. But how can you prove that $(i_X)_*([f_X]) = [i_X p_X f] = [f]$, i.e. that $i_X p_X f \simeq f$? Certainly $i_X p_X$ is in general not homotopic to the identity, thus you need some other argument. Here Fact 1 (used again for maps and homotopies) enters: It suffices to show that $p_Xi_Xp_X f \simeq p_X f$ and $p_Yi_Xp_X f \simeq p_Y f$. But $p_Xi_X = id$, thus $p_Xi_Xp_X f = p_X f$, and $p_Y i_X$ is constant so that also $p_Yi_Xp_X f$ is constant which implies that $p_Yi_Xp_X f \simeq p_Y f$ because $p_Y f$ is inessential by the assumption $[f] \in \ker (p_Y)_*$.