Solution
= Solution
This is always true. If $f(x_1)=f(x_2)$, then
$$
(g\circ f)(x_1)=g(f(x_1))=g(f(x_2))=(g\circ f)(x_2).
$$
The assumed <injective function>[injectivity] of $g\circ f$ gives $x_1=x_2$, so $f$ is injective.
= Solution
This is always true. If $f(x_1)=f(x_2)$, then
$$
(g\circ f)(x_1)=g(f(x_1))=g(f(x_2))=(g\circ f)(x_2).
$$
The assumed <injective function>[injectivity] of $g\circ f$ gives $x_1=x_2$, so $f$ is injective.