Let Speed is the funcion of K1, K2 and n. K1 and K2 are constant and n is the no. of compartment.
Speed varies as,
S = K1 - K2(n) ^ 1/2
S= 42 when n = 0 and K1 = 42
S = 24 when n = 9, So K2 = 6
Now, S become
S = 42 - 6(n) ^ 1/2 it must be > 0 (always). So, n should be maximum which is less than 49, hence n = 48.