I am looking at this Frogs game.
For example when $f=5$ the minimum number of moves is $f^2-2f=35$
Also just a note, I am only looking at when the number of red frogs is the same as the number of blue frogs. I wanted an explanation as to why the number of moves is $f^2-2f$. I know I could create a table of values for $f=1,2,3,....$ and then create an equation from that but is there any other way to determine this formula?

Let $a_n$ denote the number of moves to exchange $2n$ frogs. Then, flipping $2(n+1)$ frogs must
Hence, $$a_{n+1} = a_n + 2n - 1$$ with $a_1=1$.
Solving the recurrence yields $a_n = n^2-2n$ as you claim.