The correct option is B B = {1, 3, 7}
Given: A = {−2,−1, 0,1,2} and
f (x) = x2 + x + 1
Now,
f (-2) = (-2)2 + (-2) + 1
= 3
f (-1) = (-1)2 + (-1) + 1
= 1
f (0) = 02 + 0 + 1
= 1
f (1) = 12 + 1 + 1
= 3
f (2) = 22 + 2 + 1
= 7
Since, f is an onto function, range of f = B = co-domain of f.
∴ B = {1, 3, 7}.