To obtain the graph of $y=2x+1$ from the graph of $y=x$, we start by squeezing the graph of $y=x$ about the $y$-axis with a factor of 2, followed by translating the graph resulting graph upward by 1 unit.
However, to obtain the graph of $y=\sin(2x+1)$ from the graph of $y=\sin x$, we start by translating the graph of $y=\sin x$ to the left by 1 unit, followed by squeezing the resulting graph about the $y$-axis with a factor of 2.
I am really confused why the order of translation and stretching are inconsistent among while we are changing the same thing to both functions, namely, $x$ to $2x+1$.
Please help me.
In fact, you can obtain the graph of $y= 2x+1$ by first translating to the left one unit, and then squeezing about the y-axis.
Think about the following two graphs:
As you noted, the first is obtained from $\sin(x)$ by replacing $x$ with $2x+1$, so it can be obtained by translating left and then squeezing. The second is obtained from $\sin(x)$ by replacing $x$ with $2x$ and then adding $1$ to the end of the function, so it can be obtained by squeezing and then translating up.
$y=2x+1$ is obtained from $y=x$ by either of these algebraic transformations: either replace $x$ with $2x+1$, or replace $x$ with $2x$ and then add $1$ to the end of the function. Thus the graph of $y=2x+1$ can be obtained from $y=x$ by either geometric transformation: either translate left then squeeze, or squeeze then translate up.