Solution:
Key idea: We work out f(x)=x3+1 for each x in A and keep the pair (x,f(x)) only when f(x) is defined and its value lies in B, since the domain and range must be subsets of A and B.
Step 1 — Take x=−21. Dividing 3 by −21 is the same as multiplying by −2.
f(−21)=3×(−2)+1
f(−21)=−5
−5∈B, so (−21,−5) is kept.
Step 2 — Take x=0. The expression 03 is not defined, so 0 has no image and is left out.
Step 3 — Take x=32. Dividing 3 by 32 is the same as multiplying by 23.
f(32)=3×23+1
f(32)=29+1
f(32)=211
211 is 521, which is in B, so (32,521) is kept.
Step 4 — Take x=76. Dividing 3 by 76 is the same as multiplying by 67.
f(76)=3×67+1
f(76)=27+1
f(76)=29
29 is 421, which is in B, so (76,421) is kept.
Step 5 — Take x=1. We substitute directly.
f(1)=3+1
f(1)=4
4∈/B, so 1 is left out.
Therefore, f={(−21,−5),(32,521),(76,421)}.