Let their rate in still water = x
So....the downstream boat travels at [ x + 8 ] km/h
And the upstream boat travels at [ x - 8 ] km/h
And Distance / Rate = Time .......so....since they travel the same time, we have
56/ [ x + 8] = 24/ [x - 8] cross-multiply
56 [ x - 8] = 24 [ x + 8] simplify
56x - 448 = 24x + 192 subtract 24x from both sides, add 448 to both sides
32x = 640 divide both sides by 32
x = 20 km/h = their rate in still water