Apply that rule to each move in advance, and you'll reach the other side right away! But remember that experience is a good teacher too; so as the old saying goes, "if at first you don't succeed, try try again!"
Assume the green frogs are G1, G2, and G3 (starting with the one closest to the center). Assume the brown frogs are B1, B2, and B3 (again starting with the one closest to the center).
The color you start with can be reversed, of course.