Let x = number of days that it takes to climb out
His original position is 50 ft below the ground. Let's call his original position -50. During a given 24 hour period, he moves two feet closer to ground level. So, in x 24 hour periods, he moves upward 2x ft. When he reaches the ground, he is 50 feet above his initial position. In relation to ground level, his position is 0.
He reaches ground level when -50 + 2x = 0
2x = 50
x = 25 days