do you want an expression?
if so it would be T = 40 + 20h
t = total
h = hour(s)
Explanation is in the file
tinyurl.com/wpazsebu
Set up an equation of ratios as shown below:
h 24 ft 4
----- = ---------- = ---
4 6 ft 1
Cross multiplying the 1st and 3rd fractions, we get h=16 ft (answer)