Do all composite functions have this form? Some properties of composite functions works only when $(\star) f: A \to B, g: B\to C, gof: A \to C$.
$(1)$ I told my university professor that I did not understand why the domain of $gof$ is equal to the domain of $f$.
$(2)$ I know how to arrive at the result that the codomain of $f$ is the domain of $g$. so that the composition gof is defined we need to $Im(f) \subseteq Dom(g)$ and since $Dom(g)$ contains the images of $f$ means that $Dom(g)$ is a codomain of $f$.
But for $(1)$(what I have not understood), he answered to me: 

Now for the compound, when we write $f: A \to B$ and $g: B \to C$, we already know that the domain of $f$ is $A$, the codomain of $f$ is $B$ and the domain of $g$ is $B$. For any $a$ in $A$, we have $f (a)$ in $B$, so in the domain of $g$, therefore $g (f (a))$ is correctly defined. This shows that the domain of $gof$ is $A$.

and although what he tells me is true, since it is defined, i dont understand why that "shows that the domain of $gof$ is $A$", since i think that the domain of $gof$ does not need necessarily be the domain of $f$ to be defined.(Because of what I said in $(2)$ ). Let's take an example:
Let $f: \mathbb{R} \to [0, \infty),g: [0, \infty) \to \mathbb{R}^+$.
Here the form: $f: A \to B, g: B \to C$ is present, but $Dom(gof)$ is not $A$, i.e $\mathbb{R}$, here the domain of the $gof$ is $[0, \infty)$.
He replied that we can modify the domain and / or codomain in such a way that it is true, however I have not fully understood it and I have been confused.
So for some of the properties of the $gof$ compound functions (like this property or some of these properties) to be true, do they need to be defined like this$(\star)$? Or does it work for everyone and as my teacher answered me in $(1)$, must we change its domain and / or codomain? And if we must change it, how?
 A: If you are already given two functions $f:A\to B$ and $g:B\to C$, then the function $g\circ f$ is already defined and you don't get to choose its domain or range. The function $g\circ f$ is a map $A\to C$ whose rule is $(g\circ f)(x) = g(f(x))$ for every $x\in A$:
$$A \overbrace{\boxed{\stackrel{f}{\longrightarrow}B\stackrel{g}{\longrightarrow}}}^{\stackrel{g\circ f}{\longrightarrow}}C$$
Addendum: If instead of $f:A\to B$ and $g:C\to D$ you have the more general case $f:A\to B$ and $g:C\to D$, then the composition may not be defined since $g$ can only be applied to values of $f(x)$ for which $f(x)\in C$.
Points which $f$ maps into the domain of $g$ are precisely $A\cap f^{-1}(C)$. The restriction of $f$ to this smaller set allows the composition to be defined. So we may define $$f^*:A\cap f^{-1}(C) \to C$$ by $f^*(x) = f(x)$ (since $x\in A$) and observe that $f^*(x) \in C$ because $x\in f^{-1}(C)$.
Then the composition $g\circ f^*$ makes sense as a map $$g\circ f^* : A\cap f^{-1}(C)\to D.$$
