The frog is at the bottom of a 78 m well.
He jumps up 4 m during day, but slips 2 m back at night.
So, the total distance he jumps during 24 hrs = 4-2
Now, the frog takes 37 days to jump 74 m. Then, with just one more leap which is 4 m, he is out of the well and hence, does not slip back.
So, the frog escapes the well in 38 days.