For two sets X={-1,1,a} and Y={7,16,b}

f(x)=x^3+8 is a bijective function from X to Y. What is the value of a and b ?

bijective means 1-to-1.

f(-1) = 7
f(1) = 9

Since 16 is not used in either of those, we have
f(a) = 16, so a = 2

Since f(1) does not appear in Y, b = f(1) = 9.