.
Right and CANONICAL way to do it is as follows.
Let "t" be new variable, t = 2x+1.
Then x = .
Express 6x+2 via "t" :
6x+2 = = 3*(t-1) + 2 = 3t - 3 + 2 = 3t-1.
Thus f(t) = 3t-1.
Here "t" is a "mute" / ("silent") variable. It can be replaced by ANY symbol in both sides simultaneously.
For example, it can be replaced by x. So
f(x) = 3x-1. ANSWER
Done, completed and explained.
This my post is the standard MANTRA to use for solution to each and every similar problem.
--------------
// Mantra is called "mantra", because it DOES NOT ALLOW to change any word (!)