$f \colon A \to \mathbb R$ be a function (where $A$ is some set) and define the function $g \colon A \to \mathbb R$ as $g(x) = 3 (f(x))^2 + 1.$ Prove if $g$ is injective then $f$ is injective
How do I prove the composite of the function is injective? I know for injection every $x$ value equals a y value $(x = y)$ for injection. Is this correct:
$3(f(y))^2 + 1= 3(f(x))^2 + 1 = f(y) = f(x)$