Step 1: Read and understand the problem statement.
You are given (time, depth) pairs of (20 s, 8 cm) and (40 s, 0 cm) and asked to write an equation that describes the relationship of depth (y) to time (x).
The rate of change is (0 cm -8 cm)/(40 s -20 s) = -8 cm/(20 s) = -2/5 cm/s. Then in point-slope form using the second point, the linear function rule is
y = (-2/5)(x -40) +0
You can expand this to
y = (-2/5)x +16
y = -0.4x +16 . . . . . . using a decimal number for the slope
_____
If the bathtubs in your "draining race" start with the same level, the one with the steepest slope (-0.5 cm/s) will win.