(a) Since −3<1 use the first branch: f(−3)=−3+2=−1. Since 1≥1 and 2≥1 use the second: f(1)=12=1, f(2)=22=4.
(b) On the branch x<1 the values are x+2∈(−∞,3); on the branch x≥1 they are x2∈[1,+∞). The two branches overlap on [1,3), where the same value comes from two distinct x: hence f is not injective.
f(−3)=−1, f(1)=1, f(2)=4; not injective