When we substitute variables do we compose functions? Suppose that we have the function $f(u)=2u+3$ and we define $u=2x$. What of the below expressions are correct?
$$f(u(x))=4x+3 \ \text{or} \ f(x)=4x+3 $$
Does the "definition" serves only as a substitution (shorthand) i.e. is "$f$" still the same function or the composition of $f \circ u$ irrespective of the fact that we didn't write $u(x)=2x$ at first (abuse of notation)?

The first of your suggestions is correct:
$f(u(x)) = 2u(x) + 3 = 2(2x) + 3 = 4x + 3$.
The second is incorrect, since $f(x) = 2x + 3$.
However, it is common, especially in physics, to abuse notation and write $f(x) = 4x+3$.
