Discovering and describing the homomorphisms returned by the sagemath function direct_product()
I think the question is asking this: given groups $G$ and $H$, there are four standard homomorphisms involving $G$, $H$, and $G \times H$. Can you describe them? For example, there is supposed to be a homomorphism $\phi: H \to G \times H$. If you want to describe it, you should specify $\phi(h)$ for any element $h \in H$. $\phi(h)$ must be an element of $G \times H$; which element? Similarly, to describe $\psi: G \times H \to G$, you need to specify $\psi(g,h)$ (which should be an element of $G$) for any $(g,h) \in G \times H$.
If you specify where the generators of a group go under a homomorphism, that is enough to specify what a homomorphism does in general, and so for the particular groups in the example, it is certainly good enough. I think the question is asking whether you can figure out what happens for any groups $G$ and $H$, not just these two particular ones.