I am reading Hoffman's Contemporary Calculus. I do not understand where $2$ and $3$ came from in the textbook's solution to this problem in Chapter 1.4 Formal Definition of Limit - Problem # 19, page 11:
http://scidiv.bellevuecollege.edu/dh/Calculus_all/Calculus_all.html

The solution below states that the limit is 2 if $$x>2$$, while the limit is 3 if $$x<2$$ See 'Chapter 1 Odd Answers' in the above link.
From what I understand by looking at the graph, it should be $3$ and $4$, respectively.

You are right indeed, there must be a typo and we have that
$$\lim_{x\to2^+} f(x)=3\quad \lim_{x\to2^-} f(x)=4$$
then
$$\lim_{x\to2} f(x)$$
doesn't exist.