In order to find the value of f(2), we need to find which part of the piecewise we will use.
Looking at the intervals, the value x = 2 belongs to the second interval, so for f(2) we will use the second part. So we have that:
So the value of f(2) is 0.