[Economics] How are real income and utility the same thing?
Solution 1:
Real income and utility are not the same thing but utility can be expressed as a function of income because income is what allows you to consume goods and services.
For example, let us assume there are only two goods $x_1$ an $x_2$ and consumer is given budget $p_1 x_1 + p_2 x_2 = m$, where $p_i$ are prices for good 1 and 2 respectively and $m$ is an income. Let us assume Cobb-Douglas utility function:
$$ u(x_1, x_2) = x_1^\alpha x_2^{1-\alpha}$$
Here after solving the consumer optimization problem we would get optimum consumption of $x_1$ and $x_2$ as (I skipped the steps but you can easily derive it by setting up an Lagrangian):
$$x_1^*= \alpha \frac{m}{p_1};x_2^* = (1 -\alpha) \frac{m}{p_2}$$
Consequently, given optimal consumption of $x_1^*$ and $x_2^*$ is:
$$u(x_1^*, x_2^*) = \left( \alpha \frac{m}{p_1} \right)^\alpha \left((1 -\alpha) \frac{m}{p_2} \right)^{1-\alpha} $$
So the utility will end up being function of nothing else than a function of income $m$ an prices $p_1$ ($\alpha$ is just parameter). A utility function expressed in terms of prices and income even has its own special name 'indirect utility' typically denoted as $v$ (e.g. $v(\textbf{p},m) =\max u(\textbf{x})$ such that $\textbf{px} = m$ see Varian Microeconomic Analysis 3rd ed pp 99.)
Consequently as shown above utility does depend on income. Utility is generally not equal to real income, and I don't have the copy of the textbook you mention and you did not gave us the page for that claim, but they might have just used a utility function where utility would be proportional to real income. For a didactic purposes even assuming $v(m,\textbf{p})=\frac{m}{\textbf{p}}$ can be reasonable depending on setting even if it is not realistic because it simplifies calculations for novices (e.g. supply and demand are also typically not linear but your textbook likely draws them as linear functions).
Solution 2:
This might just be a misunderstanding. The textbook contains various passages like e.g. "An alternative approach holds real income (or utility) constant while examining reactions to changes in $p_x$" (p. 151). When this terminology is introduced, however, "real" stands in quotation marks. This is in the context of explaining the compensated as opposed to the uncompensated (standard) demand curve. In this context, "real" income is meant to be income adjusted to let you achieve the same utility as before the price change. See e.g. p. 146, where it says "we are conceptually holding “real” income (that is, utility) constant."