Well, Snell's Law is about optics. However, the principles used to derive Snell's Law apply in your situation. Different indices of refraction is directly related to different velocities of light in the medium, which is exactly like your two different velocities in the garden versus the meadow. Moreover, Fermat's principle that light will take the least amount of time to travel is the same as the constraint on your problem.
Thinking qualitatively about the problem, the farmer is better off running in the garden more directly towards the meadow, and not straight for the house. Then, when he gets in the meadow, of course, from where he crosses into the meadow, he'll run straight for the house. This will be a check on the answer.
I guess the first step would be to derive Snell's Law, if you haven't done so already. Or at least convince yourself that it is true. So at what level is your understanding of Snell's Law?
That's not the way this forum works. We help people get unstuck, but the work mainly needs to be yours. Otherwise, you see, you won't really understand (see the bottom of my signature). It's better for you if you do the work, and think through the problem yourself!Anyway, if it IS the same, can you write the solution (or at least the answer)???