The random variable $X$ has a probability density function $f_X(x)$ defined by: $$f_X(x)=\begin{cases}x-1,&1\le x\le2\\3-x,&2\le x\le3\end{cases}$$ (a) Find $P(|X-2|\le 0.5)$
I don't understand the $2$ I circled in the answer above. I get that $(1+0.5)/2$ is the triangle area and to me the rectangular area is $1*0.5$. So the answer to me is $(1+0.5)/2 + 1*0.5 = 0.375$. I don't get that $2$... Can anyone here explain me? Thanks in advance.

The distribution is symmetric about $x=2$ so $P(1.5\le X\le2.5)=2P(1.5\le X\le2)=2P(2\le X\le2.5)$.
$(1+0.5)/2\times 0.5$ is the area of the trapezium formed by the lines $x=1.5,x=2,y=x-1$ i.e. $P(1.5\le X\le 2)=(1+0.5)/2\times 0.5$. You have doubled this value to obtain the required area under the graph.