Let t=x2−1⟹x2=t+1.
Substituting into the first function:
f(t)=(t+1)2−7(t+1)+k1=t2+2t+1−7t−7+k1=t2−5t+k1−6
Now consider the second function with u=x3−2⟹x3=u+2.
Substituting into the second function:
f(u)=(u+2)2−9(u+2)+k2=u2+4u+4−9u−18+k2=u2−5u+k2−14
Since f is the same function in both cases:
k1−6=k2−14⟹k2−k1=14−6=8