I need help to show the following:
Let $f: A \to B$ and $g: B \to C$, then the following holds:
$1)$ $g(f(x))$ is surjective if and only if $g$ restricted to $f(A)$ is surjective.
$2)$ $g(f(x))$ is injective if and only if $f$ is injective and $g$ restricted to $f(A)$ is injective.
In $1)$ I first assume that $g(f(x))$ is surjective. Choose $y\in C$. Since $g(f(x))$ is surjective, there exists an $x\in A$ s.t. $g(f(x))=y$. But I got stuck here.
In the other direction I first assume that $g$ restricted to $f(A)$ is surjective, this means that there exists $x\in f(A)$ s.t. $g$ restricted to $f(A) = y$.
Any help, please?