f(3x+1)=9x²-6x+5
=(9x²+6x+1)-(12x+4)+8
=(3x+1)²-4(3x+1)+8
令t=3x+1
则f(t)=f(3x+1)=t²-4t+8
即f(x)=x²-4x+8