(f of g) versus (f as a function of g) I've run into a problem dealing with notation. Say I have two functions:

$f(x)=x+2$
$g(x)=\frac x3$

From basic function composition, we know that $f$ of $g$ is:

$f(g(x))=\frac x3 +2$

However, to find $f$ as a function of $g$, we find that $x=3g(x)$ and substitute:

$f(g(x))=3g(x)+2$

Thus we see that two different ideas share the same notation. Am I making a mistake in the notation of these ideas? If not, then is there some way to differentiate the two? I ran across this problem when dealing with parametric equations and indicating "y(t) as a function of x(t)" as y(x(t)), which could also mean "y of x(t)". Any help would be greatly appreciated.
 A: The difference is that when saying "$f$ as a function of $g$", the variable becomes $g(x)$. You can think of this as making a change of variable $y=g(x)$. The composition of functions is another thing entirely, namely, applying two functions in succession. 
A: The terms composition of and as a function of denote the same idea, but the application of the substitution at the end is not correct.

A substitution of the form
  \begin{align*}
y = z \tag{1}
\end{align*}
  is a rule specifying a pattern replacement. It means replace each occurrence of the left side of (1) with the right side. 
If  there is   an  expression
  \begin{align*}
f(x)=x+2\tag{2}
\end{align*}
  and we have to perform a substitution $x=3g(x)$, this means that each occurrence of $x$ in (2) has to be replaced with $3g(x)$ giving
  \begin{align*}
f(3g(x))=3g(x)+2\\
\end{align*}

$$ $$

In the context of $f$ as a function of we can say in the current case: $f$ as a function of $3 g$ and this is syntactically and semantically equivalent with considering a composition of a function $f$ with the function $3g$.
  \begin{align*}
\left(f\circ (3g)\right)(x)=f(3g(x))
\end{align*}

