Let A,B, and C be nonempty sets and lef f map A to B and g map B to C.
If g of f maps A to C is an injection, then f is an injection.
Not sure how to do this proof
Let's say you already know (in the given context) the definition of injection.
For arbitrary x and y in A, suppose that over in B, f(x) = f(y).
This identity should tell you that (over in C) the image of f(x) under g is identical to the image of f(y) under g, i.e., that g(f(x)) = g(f(y)).
This can be written, (gof)(x) = (gof)(y).
Since gof is injective, you now have x = y (by definition).
So the arbitrariness of x, y and the supposition that f(x) = f(y), leads you to x = y, making f injective (by definition).