From the diagram we can see:
[tex]\begin{gathered} step_{\text{ }}1\colon \\ 1_{\text{ }}square \\ step_{\text{ }}2\colon \\ 4\text{ }squares \\ step_{\text{ }}3\colon \\ 9\text{ }squares \end{gathered}[/tex]Therefore, we can conclude that in every step the result is the square of the number of the step. So:
[tex]\begin{gathered} f(x)=x^2 \\ ---- \\ f(1)=(1)^2=1 \\ ---- \\ f(2)=(2)^2=4 \\ ---- \\ f(3)=(3)^2=9 \end{gathered}[/tex]