You do not provide us with the specified values, but I'll pick some.
All you have to do is see where your value fits and plug it into the corresponding equation.
f(1): Well, if x ≤ 1, we use the first equation.
f(1) = 12 + 2 = 1 + 2 = 3
f(-1) also uses the first equation.
f(-1) = (-1)2 + 2 = 1 + 2 = 3
f(5) uses the second equation.
f(5) = 2(52) + 2 = 2(25) + 2 = 50 + 2 = 52