How are the equations of $f(x)$ and $f(kx+c)$ related? We have $f(x) = \frac{5x}{2}+9$ .

The graph of $f(x)$ is the green line. The graphs of $f(2x)$ and $f(x-1)$ are the blue and red lines, respectively. We see that $f(2x)= 5x+9$ and $f(x-1) = \frac{5}{2}(x-1)+9$ which are just putting $2x$ and $(x-1)$ in $f(x)$.
But when we graph $f(2x-1)$ (the purple line) we see something like the below.

It is horizontally compressed by a factor of $\frac{1}{2}$ and shifted horizontally by $1$ unit. And its equation isn't just what we'll get by putting $2x-1$ in $f(x)$. Moreover, if we horizontally shift $f(x)$ by $1$ unit and then compress it by a factor of $\frac{1}{2}$ we do not get the same graph as $f(2x-1)$. Why?
If we try to graph $f(2x-1)$ by letting $x$ = some value and plotting the points on a cartesian plane, we also don't get the same graph as $f(2x-1)$, my question is why is this difference and how are the equations of $f(x)$ and $f(kx+c)$ related?
Edit: Here's an article related to my question:  https://brilliant.org/wiki/graph-transformation/
This question is from the book introduction to algebra by Richard rusczyk page no: 482. The transformation given there is wrong.
 A: It is true that the substitution $x\mapsto 2x$ results in horizontal compression of the graph and the substitution $x\mapsto x-1$ corresponds to a horizontal shift.
If we try to do them both, the function expression we get is
$$
f(2x-1) = \frac{5(2x-1)}2 + 9 = 5x - \frac{13}2
$$ which indeed isn't what your purple graph shows. So what is happening?
The simple answer is that your purple graph is wrong. This is what I got when I graphed $f(2x-1)$:

and indeed we see that the purple line corresponds nicely with the above function expression.
The order of compressing and shifting corresponds to the (opposite of the) arithmetic order of operations in the expression $2x-1$. In your work, try changing the arithmetic order of operations by instead inserting $2(x-1)$ into the expression for $f$, and you will see that you get the correct function expression for your purple graph.
Or change the geometric order of operations by first shifting, then compressing, and see that you get the same as my purple graph.
So the full answer is that the substitution $x\mapsto kx + c$ will first shift the graph $c$ units to the left, and then compress the graph by a factor of $k$ (keeping the $y$-intercept fixed).
A: I think the confusion comes from the canonical form you are using $f(kx+c)$, which corresponds to stretching the domain, and then translating $c$ units after the stretch (note that stretching changes the meaning of "$1$ unit", but $c$ is still referring to our natural understanding of "$1$ unit").
Usually, and I think for good intuitive reason, the following form is used $f(k(x+c))$. This means that we translate the domain by $c$ units (where "$1$ unit" has it's original/natural meaning), and then we stretch the domain.
Note that you can always switch between the 2 forms via $f(kx+c)=f(k(x+c/k))$.
Using the form $f(k(x+c))$, we can work backwards to see the effect on $f$. Namely, horizontal stretch by a factor of $1/k$ (because $f$ is reporting the value of any point $kx_0$ early, namely at the point $x_0=(1/k)(kx_0)$) and horizontal translation by $-c$ units (because $f$ is reporting the value of any point $x_0+c$ early, namely at the point $x_0=(x_0+c)-c$).
