# From algebraic symbols to symbolic functions

i have a code which gives an output of this kind:

rrr=2*f+1;


Now i define a simple function:

f[x_]:=3*x+2;

1. How should i do if i want the variable f to be replaced by the function f[x_] ?
2. If i want to do the inverse process: from the function f[x_] to f ?

rrr2 = rrr /. f -> f[x]

rrr2 /. f[x] -> f