AMC12 2007 12B, Problem 9

A function $f$ has the property that $f(3x-1)=x^2+x+1$ for all real numbers $x$.  What is $f(5)$?

Solution: $3x-1 =5 \implies x= 2$ $f(3(2)-1) = 2^2+2+1=7 $ $\fbox{7}$.

Answer: 7